Skip to content

Commit 4f9664d

Browse files
committed
fix(dark-mode): fix Timeline, Calendar, and Slider theming
- Timeline: make head/dot-container bg transparent to eliminate grey column artifact; give dot circle a solid bg to mask the line - Calendar: add calendar-bg, calendar-border, calendar-hover tokens to both light and dark themes (was falling back to hardcoded #fff) - Slider: use var(--ty-color-primary) for thumb border so it follows runtime theme color changes from the color picker
1 parent e49d29f commit 4f9664d

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

components/slider/style/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
box-sizing: border-box;
115115
width: 14px;
116116
height: 14px;
117-
border: 1px solid var(--ty-slider-thumb-border);
117+
border: 1px solid var(--ty-color-primary);
118118
background-color: var(--ty-slider-thumb-bg);
119119
border-radius: 50%;
120120
transition: transform 250ms;

components/style/themes/_dark.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,9 @@ $dark-theme: (
372372
cascader-dropdown-bg: #1f1f1f,
373373
cascader-hover: #2a2a2a,
374374
cascader-selected-bg: rgba(144, 101, 208, 0.1),
375+
376+
// ---- Component-specific: Calendar ----
377+
calendar-bg: #1f1f1f,
378+
calendar-border: #363636,
379+
calendar-hover: #2a2a2a,
375380
);

components/style/themes/_light.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,9 @@ $light-theme: (
372372
cascader-dropdown-bg: #fff,
373373
cascader-hover: #f5f5f5,
374374
cascader-selected-bg: rgba(110, 65, 191, 0.06),
375+
376+
// ---- Component-specific: Calendar ----
377+
calendar-bg: #fff,
378+
calendar-border: #e9ecef,
379+
calendar-hover: #f6f9fc,
375380
);

components/timeline/style/_index.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
&__head {
3030
width: 16px;
31-
background-color: var(--ty-timeline-head-bg);
31+
background-color: transparent;
3232
position: absolute;
3333
color: var(--ty-color-primary);
3434
height: 100%;
@@ -48,7 +48,7 @@
4848
position: absolute;
4949
left: 50%;
5050
transform: translateX(-50%);
51-
background-color: var(--ty-timeline-dot-bg);
51+
background-color: transparent;
5252
}
5353

5454
&__dot {
@@ -57,6 +57,7 @@
5757
height: 10px;
5858
border: 2px solid var(--ty-color-primary);
5959
border-radius: 100px;
60+
background-color: var(--ty-color-bg);
6061
}
6162

6263
&__content {

0 commit comments

Comments
 (0)