Skip to content

Commit e31347c

Browse files
committed
DDK compatibility changes
1 parent 256ae10 commit e31347c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@
55
align-items: center;
66
width: 170px; /* default input width */
77
height: 32px;
8+
background: var(--Dash-Fill-Inverse-Strong);
89
border-radius: var(--Dash-Spacing);
910
border: 1px solid var(--Dash-Stroke-Strong);
1011
box-sizing: border-box;
1112
container-type: inline-size;
1213
vertical-align: middle;
14+
color: inherit;
15+
overflow: hidden;
16+
}
17+
18+
.dash-input-container:has(input[type='range']) {
19+
background: inherit;
1320
}
1421

1522
/* Input field styles */
1623
.dash-input-element {
1724
padding: var(--Dash-Spacing) calc(2 * var(--Dash-Spacing));
18-
background: var(--Dash-Fill-Inverse-Strong);
25+
color: inherit;
26+
background: inherit;
1927
border: none;
2028
border-radius: var(--Dash-Spacing);
2129
flex: 1 1 0;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
transition: all 0.15s ease-in-out;
6767
}
6868

69+
.dash-slider-thumb:focus,
6970
.dash-slider-thumb:hover {
7071
transform: scale(1.125); /* Scale to make 16px thumb appear as 18px */
7172
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
@@ -80,7 +81,7 @@
8081
position: absolute;
8182
font-size: 12px;
8283
line-height: 12px;
83-
color: #6b7280;
84+
color: var(--Dash-Text-Strong);
8485
white-space: nowrap;
8586
pointer-events: none;
8687
}

components/dash-core-components/src/fragments/RangeSlider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ export default function RangeSlider(props: RangeSliderProps) {
285285
disabled={disabled}
286286
/>
287287
)}
288-
<div className="dash-slider-wrapper">
288+
<div
289+
className="dash-slider-wrapper"
290+
onClickCapture={e => e.preventDefault()} // prevent interactions from "clicking" the parent, particularly when slider is inside a label tag
291+
>
289292
<Tooltip.Provider>
290293
<RadixSlider.Root
291294
ref={sliderRef}

0 commit comments

Comments
 (0)