Skip to content

Commit d41e015

Browse files
fix(DatePicker): make underline variant border override order-independent
The underline variant relied on datepicker.module.scss's .picker-underline { border-color: transparent } outranking the base .picker { border: var(--picker-border) } from ocpicker.module.scss. Both selectors have equal specificity, so the winner was decided by CSS emission order in the consuming app's webpack build — which is derived from the app-wide import graph and can flip on unrelated changes (mini-css-extract conflicting-order resolution). When it flips, the box border reappears around underline-sized content and clips the suffix calendar icon. Declare border-color: transparent inside ocpicker.module.scss's own .picker-underline block, where same-file source order guarantees it always follows the base .picker rule regardless of bundler ordering. Covers DatePicker, TimePicker and RangePicker (shared internal styles). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 708a1d6 commit d41e015

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/DateTimePicker/Internal/ocpicker.module.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
border-radius: $picker-border-radius;
1010
display: inline-flex;
1111
font-family: var(--font-stack-full);
12-
12+
1313
.pickerLabel {
1414
position: relative;
1515
}
@@ -1705,6 +1705,12 @@
17051705
}
17061706

17071707
&-underline {
1708+
// Must live in this file: the box border it hides is set by `.picker`
1709+
// above, at equal specificity. Cross-file overrides (datepicker.module.scss)
1710+
// depend on the consuming app's webpack CSS emission order, which is not
1711+
// guaranteed — same-file source order is.
1712+
border-color: transparent;
1713+
17081714
.picker-input {
17091715
&:before {
17101716
border-bottom: 1px solid var(--input-border-color);

0 commit comments

Comments
 (0)