Skip to content

Commit 7f5c5c3

Browse files
committed
Add CSS variables for shadows
1 parent 4720ce8 commit 7f5c5c3

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

components/dash-core-components/src/components/css/Dropdown.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

components/dash-core-components/src/components/css/dcc.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
--Dash-Fill-Primary-Hover: rgba(0, 18, 77, 0.04);
1212
--Dash-Fill-Primary-Active: rgba(0, 18, 77, 0.08);
1313
--Dash-Fill-Disabled: rgba(0, 24, 102, 0.1);
14+
--Dash-Shading-Strong: rgba(22, 23, 24, 0.35);
15+
--Dash-Shading-Weak: rgba(22, 23, 24, 0.2);
1416
}

components/dash-core-components/src/components/css/dropdown.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
max-width: 98vw;
7272
overflow-y: auto;
7373
z-index: 500;
74-
box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35),
75-
0px 10px 20px -15px rgba(22, 23, 24, 0.2);
74+
box-shadow: 0px 10px 38px -10px var(--Dash-Shading-Strong),
75+
0px 10px 20px -15px var(--Dash-Shading-Weak);
7676
}
7777

7878
.dash-dropdown-value-count,

components/dash-core-components/src/components/css/sliders.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
background-color: var(--Dash-Fill-Interactive-Strong);
5959
border: 2px solid var(--Dash-Fill-Inverse-Strong);
6060
border-radius: 50%;
61-
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
61+
box-shadow: 0 1px 3px 0 var(--Dash-Shading-Weak);
6262
cursor: pointer;
6363
outline: none;
6464
transition: all 0.15s ease-in-out;
@@ -67,7 +67,7 @@
6767
.dash-slider-thumb:focus,
6868
.dash-slider-thumb:hover {
6969
transform: scale(1.125); /* Scale to make 16px thumb appear as 18px */
70-
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
70+
box-shadow: 0 4px 6px -1px var(--Dash-Shading-Weak);
7171
}
7272

7373
.dash-slider-thumb:focus .dash-slider-tooltip,
@@ -125,7 +125,7 @@
125125
padding: calc(var(--Dash-Spacing) * 3);
126126
font-size: 12px;
127127
line-height: 1;
128-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
128+
box-shadow: 0 0 8px var(--Dash-Shading-Strong);
129129
background-color: var(--Dash-Fill-Inverse-Strong);
130130
user-select: none;
131131
z-index: 1000;

0 commit comments

Comments
 (0)