Skip to content

Commit 67cf691

Browse files
committed
chore: improve css variables mapping
1 parent add6cc1 commit 67cf691

7 files changed

Lines changed: 19 additions & 21 deletions

File tree

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import "date-picker";
22

3+
$filter-shadow-color:
4+
0 2px 20px 1px rgba(5, 15, 129, 0.05),
5+
0 2px 16px 0 rgba(33, 43, 54, 0.08) !default;
6+
37
@font-face {
48
font-family: "datagrid-filters";
59
src: url("./fonts/datagrid-filters.eot");
@@ -70,9 +74,7 @@
7074
z-index: 51;
7175
border-radius: 8px;
7276
list-style-type: none;
73-
box-shadow:
74-
0 2px 20px 1px rgba(5, 15, 129, 0.05),
75-
0 2px 16px 0 rgba(33, 43, 54, 0.08);
77+
box-shadow: var(--filter-shadow-color, $filter-shadow-color);
7678
overflow: hidden;
7779

7880
.filter-listitem,
@@ -142,19 +144,15 @@
142144
:not(.dropdown-content) > .dropdown-list {
143145
background: var(--bg-color-secondary, $bg-color-secondary);
144146
border-radius: 8px;
145-
box-shadow:
146-
0 2px 20px 1px rgba(5, 15, 129, 0.05),
147-
0 2px 16px 0 rgba(33, 43, 54, 0.08);
147+
box-shadow: var(--filter-shadow-color, $filter-shadow-color);
148148
max-height: 40vh;
149149
z-index: 102;
150150
}
151151

152152
.dropdown-content {
153153
background: var(--bg-color-secondary, $bg-color-secondary);
154154
border-radius: 8px;
155-
box-shadow:
156-
0 2px 20px 1px rgba(5, 15, 129, 0.05),
157-
0 2px 16px 0 rgba(33, 43, 54, 0.08);
155+
box-shadow: var(--filter-shadow-color, $filter-shadow-color);
158156
max-height: 40vh;
159157
z-index: 140;
160158
}
@@ -205,9 +203,7 @@
205203
z-index: 102;
206204
border-radius: 8px;
207205
list-style-type: none;
208-
box-shadow:
209-
0 2px 20px 1px rgba(5, 15, 129, 0.05),
210-
0 2px 16px 0 rgba(33, 43, 54, 0.08);
206+
box-shadow: var(--filter-shadow-color, $filter-shadow-color);
211207
overflow-x: hidden;
212208
max-height: 40vh;
213209

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.widget-datagrid-export-alert {
2-
background-color: rgba(255, 255, 255, 1);
2+
background-color: var(--bg-color-secondary, $bg-color-secondary);
33
border-radius: 4px;
44
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
55
display: flex;
@@ -26,7 +26,7 @@
2626
}
2727

2828
&-message {
29-
color: rgba(38, 74, 229, 1);
29+
color: var(--brand-primary, $brand-primary);
3030
font-size: 18px;
3131
font-weight: 700;
3232
display: flex;
@@ -37,7 +37,7 @@
3737

3838
&-failed {
3939
.widget-datagrid-export-progress-indicator {
40-
background-color: rgba(227, 63, 78, 1);
40+
background-color: var(--brand-danger, $brand-danger);
4141
}
4242
}
4343
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.widget-datagrid-export-progress {
22
align-items: center;
3-
background-color: rgba(240, 241, 242, 1);
3+
background-color: var(--brand-default, $brand-default);
44
border-radius: 4px;
55
display: flex;
66
height: 18px;
@@ -10,7 +10,7 @@
1010
width: 100%;
1111

1212
&-indicator {
13-
background-color: rgba(38, 74, 229, 1);
13+
background-color: var(--brand-primary, $brand-primary);
1414
border-radius: 4px;
1515
height: 17px;
1616
transition: transform 100ms cubic-bezier(0.65, 0, 0.35, 1);

packages/modules/data-widgets/src/themesource/datawidgets/web/_gallery-design-properties.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
background-color: var(--grid-bg-striped, $grid-bg-striped);
6464
}
6565
.widget-gallery-item:nth-child(even) {
66-
background-color: #fff;
66+
background-color: var(--bg-color-secondary, $bg-color-secondary);
6767
}
6868
}
6969

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.widget-datagrid-modal {
22
&-overlay {
33
animation: fade-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
4-
background-color: rgba(128, 128, 128, 0.5);
4+
background-color: var(--shadow-color, $shadow-color);
55
position: absolute;
66
top: 0;
77
right: 0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
position: absolute;
9494
top: 0;
9595
left: 7px;
96-
border: 1px solid #b6b8be;
96+
border: var(--border-default, $border-default);
9797
}
9898
}
9999

@@ -105,7 +105,7 @@
105105
position: absolute;
106106
width: 10px;
107107
height: 0;
108-
border: 1px solid #b6b8be;
108+
border: var(--border-default, $border-default);
109109
top: 50%;
110110
left: -16px;
111111
transform: translate(0, -50%);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ $btn-primary-color: $color-base !default;
3232
// Border colors
3333
$border-color-default: #ced0d3 !default;
3434
$grid-border-color: #ced0d3 !default;
35+
$border-default: 1px solid $border-color-default !default;
3536

3637
// Sizing and spacing
3738
$btn-font-size: 14px !default;
@@ -46,6 +47,7 @@ $gallery-gap: $spacing-small !default;
4647

4748
// Effects and animations
4849
$dragging-color-effect: rgba(10, 19, 37, 0.8) !default;
50+
$shadow-color: rgba($gray-primary, 0.5) !default;
4951
$skeleton-background: linear-gradient(90deg, rgba(194, 194, 194, 0.2) 0%, #d2d2d2 100%) !default;
5052

5153
// Assets

0 commit comments

Comments
 (0)