Skip to content

Commit 4127525

Browse files
committed
refactor: clean up and standardize SCSS variables
1 parent 265d298 commit 4127525

File tree

4 files changed

+64
-30
lines changed

4 files changed

+64
-30
lines changed

packages/modules/data-widgets/src/themesource/datawidgets/web/_datagrid-filters.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
$dg-hover-color: #f8f8f8;
2-
$dg-background-color: #fff;
3-
$dg-selected-color: #dadcde;
4-
$dg-border-color: #ced0d3;
5-
$dg-spacing-small: 8px;
6-
$arrow: "resources/dropdown-arrow.svg";
7-
$dg-item-min-height: 32px;
8-
91
@import "date-picker";
102

113
@font-face {
@@ -193,7 +185,7 @@ $dg-item-min-height: 32px;
193185
caret-color: transparent;
194186
cursor: pointer;
195187

196-
background-image: url($arrow);
188+
background-image: url($dg-arrow);
197189
background-repeat: no-repeat;
198190
background-position: center;
199191
background-position-x: right;

packages/modules/data-widgets/src/themesource/datawidgets/web/_datagrid.scss

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22
@import "export-progress";
33
@import "pseudo-modal";
44

5-
$dg-background-color: #fff;
6-
$dg-icon-color: #606671;
7-
$dg-icon-size: 14px;
8-
$dg-pagination-button-color: #3b4251;
9-
$dg-pagination-caption-color: #0a1325;
10-
$dragging-color-effect: rgba(10, 19, 37, 0.8);
11-
$dg-dragging-effect-size: 4px;
12-
13-
$dg-grid-bg-striped: #fafafb;
14-
$dg-grid-bg-hover: #f5f6f6;
15-
$dg-spacing-small: 8px;
16-
$dg-spacing-medium: 16px;
17-
$dg-spacing-large: 24px;
18-
$dg-grid-border-color: #ced0d3;
19-
20-
$dg-brand-primary: #264ae5;
21-
$dg-brand-light: #e6eaff;
22-
$dg-grid-selected-row-background: $dg-brand-light;
23-
$dg-skeleton-background: linear-gradient(90deg, rgba(194, 194, 194, 0.2) 0%, #d2d2d2 100%);
24-
255
$root: ".widget-datagrid";
266

277
.table {
@@ -64,7 +44,7 @@ $root: ".widget-datagrid";
6444
top: 0;
6545
height: 100%;
6646
width: var(--spacing-smaller, $dg-dragging-effect-size);
67-
background-color: $dragging-color-effect;
47+
background-color: $dg-dragging-color-effect;
6848

6949
z-index: 1;
7050
}

packages/modules/data-widgets/src/themesource/datawidgets/web/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "../../../theme/web/custom-variables";
2+
@import "variables";
23
@import "datagrid";
34
@import "datagrid-filters";
45
@import "datagrid-dropdown-filter";
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Atlas UI compatible variable naming for data widgets
2+
// Background colors
3+
$dg-background-color: #fff !default;
4+
$dg-grid-bg-striped: #fafafb !default;
5+
$dg-grid-bg-hover: #f5f6f6 !default;
6+
$dg-hover-color: #f8f8f8 !default;
7+
$dg-selected-color: #dadcde !default;
8+
9+
// Brand colors
10+
$dg-brand-primary: #264ae5 !default;
11+
$dg-brand-light: #e6eaff !default;
12+
$dg-grid-selected-row-background: $dg-brand-light !default;
13+
14+
// Text and icon colors
15+
$dg-icon-color: #606671 !default;
16+
$dg-pagination-button-color: #3b4251 !default;
17+
$dg-pagination-caption-color: #0a1325 !default;
18+
19+
// Border colors
20+
$dg-border-color: #ced0d3 !default;
21+
$dg-grid-border-color: #ced0d3 !default;
22+
23+
// Sizing and spacing
24+
$dg-icon-size: 14px !default;
25+
$dg-spacing-small: 8px !default;
26+
$dg-spacing-medium: 16px !default;
27+
$dg-spacing-large: 24px !default;
28+
$dg-item-min-height: 32px !default;
29+
30+
// Effects and animations
31+
$dg-dragging-color-effect: rgba(10, 19, 37, 0.8) !default;
32+
$dg-dragging-effect-size: 4px !default;
33+
$dg-skeleton-background: linear-gradient(90deg, rgba(194, 194, 194, 0.2) 0%, #d2d2d2 100%) !default;
34+
35+
// Assets
36+
$dg-arrow: "resources/dropdown-arrow.svg" !default;
37+
38+
:root {
39+
--dg-background-color: #{$dg-background-color};
40+
--dg-icon-color: #{$dg-icon-color};
41+
--dg-icon-size: #{$dg-icon-size};
42+
--dg-pagination-button-color: #{$dg-pagination-button-color};
43+
--dg-pagination-caption-color: #{$dg-pagination-caption-color};
44+
--dg-dragging-color-effect: #{$dg-dragging-color-effect};
45+
--dg-dragging-effect-size: #{$dg-dragging-effect-size};
46+
--dg-grid-bg-striped: #{$dg-grid-bg-striped};
47+
--dg-grid-bg-hover: #{$dg-grid-bg-hover};
48+
--dg-spacing-small: #{$dg-spacing-small};
49+
--dg-spacing-medium: #{$dg-spacing-medium};
50+
--dg-spacing-large: #{$dg-spacing-large};
51+
--dg-grid-border-color: #{$dg-grid-border-color};
52+
--dg-brand-primary: #{$dg-brand-primary};
53+
--dg-brand-light: #{$dg-brand-light};
54+
--dg-grid-selected-row-background: #{$dg-grid-selected-row-background};
55+
--dg-skeleton-background: #{$dg-skeleton-background};
56+
--dg-hover-color: #{$dg-hover-color};
57+
--dg-selected-color: #{$dg-selected-color};
58+
--dg-border-color: #{$dg-border-color};
59+
--dg-item-min-height: #{$dg-item-min-height};
60+
--dg-arrow: #{$dg-arrow};
61+
}

0 commit comments

Comments
 (0)