Skip to content

Commit e24ee6c

Browse files
committed
refactor(styles): remove hardcoded colors from SCSS
- _blocks: document caret selector for inline white background (no behavior change) - _desktop: remove dead commented block; note theme tokens if reintroduced - _unread-badge: use theme tokens only (drop fallback hex) Made-with: Cursor
1 parent c2109cd commit e24ee6c

File tree

4 files changed

+13
-57
lines changed

4 files changed

+13
-57
lines changed

packages/webapp/src/styles/_blocks.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
caret-color: inherit;
115115
}
116116

117-
/* Elements with white/light backgrounds need explicit caret color */
117+
/* Elements with white/light backgrounds (e.g. inline styles) need explicit caret color; selectors intentionally match hex/word */
118118
.heading[level='1'],
119119
[style*='background-color: #fff'],
120120
[style*='background-color: white'],
Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1 @@
1-
// .m_desktop {
2-
// .btn_openChatBox {
3-
// position: absolute;
4-
// left: 100%;
5-
// display: flex;
6-
// width: 2rem;
7-
// height: 2rem;
8-
// align-items: center;
9-
// justify-content: center;
10-
// overflow: hidden;
11-
// border-radius: 0.75rem;
12-
// background-color: var(--bg-docy);
13-
// fill: white;
14-
// padding: 0.5rem;
15-
// color: var(--neutral-content);
16-
// display: flex;
17-
// align-items: center;
18-
// justify-content: center;
19-
20-
// svg {
21-
// fill: #fff;
22-
// display: block;
23-
// margin: auto;
24-
// }
25-
26-
// .chatLeft {
27-
// fill: #fff;
28-
// position: relative;
29-
// top: 1px;
30-
// display: inline-flex;
31-
// align-items: center;
32-
// justify-content: center;
33-
// margin: auto;
34-
// }
35-
36-
// &[data-unread-count]:not([data-unread-count='']) {
37-
// .chatLeft {
38-
// display: none;
39-
// }
40-
// }
41-
42-
// &::before {
43-
// content: attr(data-unread-count);
44-
// color: #fff;
45-
// font-weight: 600;
46-
// display: flex;
47-
// align-items: center;
48-
// justify-content: center;
49-
// }
50-
// }
51-
// }
1+
// Legacy .m_desktop .btn_openChatBox removed; use theme tokens (e.g. var(--color-primary-content)) if reintroduced.

packages/webapp/src/styles/components/_heading-actions.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@
7777
// Dark: softer shadow so no light halo on dark canvas
7878
[data-theme='docsplus-dark'] &:hover .ha-wrap.has-selection > .ha-group,
7979
[data-theme='docsplus-dark-hc'] &:hover .ha-wrap.has-selection > .ha-group,
80-
[data-theme='docsplus-dark'] & .ha-wrap.has-selection > .ha-group[data-unread-count]:not([data-unread-count='']),
81-
[data-theme='docsplus-dark-hc'] & .ha-wrap.has-selection > .ha-group[data-unread-count]:not([data-unread-count='']) {
80+
[data-theme='docsplus-dark']
81+
&
82+
.ha-wrap.has-selection
83+
> .ha-group[data-unread-count]:not([data-unread-count='']),
84+
[data-theme='docsplus-dark-hc']
85+
&
86+
.ha-wrap.has-selection
87+
> .ha-group[data-unread-count]:not([data-unread-count='']) {
8288
box-shadow:
8389
0 1px 3px 0 color-mix(in oklch, var(--color-base-content) 6%, transparent),
8490
0 1px 2px 0 color-mix(in oklch, var(--color-base-content) 4%, transparent),

packages/webapp/src/styles/components/_unread-badge.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
height: $size;
2525
padding: 0 6px;
2626

27-
// Error color (red) - !important to override btn/daisyUI styles
28-
background-color: var(--color-error, #ef4444) !important;
29-
color: var(--color-error-content, #fff) !important;
27+
// Theme-aware error color !important to override btn/daisyUI styles
28+
background-color: var(--color-error) !important;
29+
color: var(--color-error-content) !important;
3030
border-radius: calc($size / 2);
3131

3232
font-size: $font-size;

0 commit comments

Comments
 (0)