Skip to content

Commit c0729a2

Browse files
committed
Fix CSS selector could incorrectly apply to dropdown triggers
1 parent 566107b commit c0729a2

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
align-items: center;
2121
gap: calc(var(--Dash-Spacing) * 2);
2222
box-sizing: border-box;
23-
padding: 0 calc(var(--Dash-Spacing) * 2);
23+
padding: 0 12px;
2424
}
2525

26-
.dash-datepicker-input-wrapper:has(:nth-child(3)) {
27-
grid-template-columns: auto 1fr auto;
26+
.dash-datepicker-input-wrapper:has(> :nth-child(2)) {
27+
grid-template-columns: 1fr auto;
2828
}
2929

30-
.dash-datepicker-input-wrapper:has(:nth-child(4)) {
31-
grid-template-columns: auto 1fr auto auto;
30+
.dash-datepicker-input-wrapper:has(> :nth-child(3)) {
31+
grid-template-columns: 1fr auto auto;
3232
}
3333

34-
.dash-datepicker-input-wrapper:has(:nth-child(5)) {
35-
grid-template-columns: auto auto auto 1fr auto;
34+
.dash-datepicker-input-wrapper:has(> :nth-child(4)) {
35+
grid-template-columns: 1fr auto 1fr auto;
3636
}
3737

38-
.dash-datepicker-input-wrapper:has(:nth-child(6)) {
39-
grid-template-columns: auto auto auto 1fr auto auto;
38+
.dash-datepicker-input-wrapper:has(> :nth-child(5)) {
39+
grid-template-columns: 1fr auto 1fr auto auto;
4040
}
4141

4242
.dash-datepicker-input-wrapper,
@@ -55,6 +55,7 @@
5555
border-radius: 4px;
5656
padding: 0;
5757
background-color: inherit;
58+
color: inherit;
5859
}
5960

6061
.dash-datepicker-input::selection,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
grid-template-columns: auto 1fr;
2020
justify-items: start;
2121
align-items: center;
22-
gap: 8px;
22+
gap: calc(var(--Dash-Spacing) * 2);
2323
}
2424

25-
.dash-dropdown-grid-container:has(:nth-child(3)) {
25+
.dash-dropdown-grid-container:has(> :nth-child(3)) {
2626
grid-template-columns: auto 1fr auto;
2727
}
2828

29-
.dash-dropdown-grid-container:has(:nth-child(4)) {
29+
.dash-dropdown-grid-container:has(> :nth-child(4)) {
3030
grid-template-columns: auto 1fr auto auto;
3131
}
3232

0 commit comments

Comments
 (0)