Skip to content

Commit e5b1107

Browse files
committed
Update Button and StatusBar component styles with custom variables and gradients
- should use gradients, so that the right side is always colored as 'default' (gray background with blue foreground of actions) └── packages └── ui └── src └── components └── editor └── prompt └── StatusBar ├── StatusBar.module.scss └── StatusBar.tsx
1 parent 0326d48 commit e5b1107

2 files changed

Lines changed: 32 additions & 39 deletions

File tree

‎packages/ui/src/components/editor/common/Button/Button.module.scss‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
}
3535

3636
&--secondary {
37-
background-color: var(--vscode-button-secondaryBackground);
38-
color: var(--vscode-button-secondaryForeground);
37+
background-color: var(--cwc-bg-secondary);
38+
color: var(--cwc-text-color);
3939

4040
&:hover {
41-
background-color: var(--vscode-button-secondaryHoverBackground);
41+
background-color: var(--cwc-bg-primary);
4242
}
4343

4444
&:disabled {
4545
&:hover {
46-
background-color: var(--vscode-button-secondaryBackground);
46+
background-color: var(--cwc-bg-secondary);
4747
}
4848
}
4949
}

‎packages/ui/src/components/editor/prompt/StatusBar/StatusBar.module.scss‎

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,66 +30,58 @@
3030

3131
.theme-default {
3232
color: var(--cwc-text-color);
33-
background-color: var(--cwc-bg-tertiary);
33+
background: var(--cwc-bg-tertiary);
3434
--theme-description-color: var(--cwc-text-color-dimmed);
35-
36-
.action {
37-
color: var(--vscode-textLink-foreground);
38-
}
39-
40-
.action:hover {
41-
background-color: var(--cwc-bg-tertiary);
42-
}
4335
}
4436

4537
.theme-warning {
4638
color: var(--cwc-yellow-foreground);
47-
background-color: var(--cwc-yellow-background);
39+
background: linear-gradient(
40+
45deg,
41+
var(--cwc-yellow-background) 10px,
42+
var(--cwc-bg-tertiary) 40px
43+
);
4844
--theme-description-color: var(--cwc-yellow-foreground-dimmed);
49-
50-
.action:hover {
51-
background-color: var(--cwc-yellow-background);
52-
}
5345
}
5446

5547
.theme-success {
5648
color: var(--cwc-green-foreground);
57-
background-color: var(--cwc-green-background);
49+
background: linear-gradient(
50+
45deg,
51+
var(--cwc-green-background) 10px,
52+
var(--cwc-bg-tertiary) 40px
53+
);
5854
--theme-description-color: var(--cwc-green-foreground-dimmed);
59-
60-
.action:hover {
61-
background-color: var(--cwc-green-background);
62-
}
6355
}
6456

6557
.theme-error {
6658
color: var(--cwc-red-foreground);
67-
background-color: var(--cwc-red-background);
59+
background: linear-gradient(
60+
45deg,
61+
var(--cwc-red-background) 10px,
62+
var(--cwc-bg-tertiary) 40px
63+
);
6864
--theme-description-color: var(--cwc-red-foreground-dimmed);
69-
70-
.action:hover {
71-
background-color: var(--cwc-red-background);
72-
}
7365
}
7466

7567
.theme-blue {
7668
color: var(--cwc-blue-foreground);
77-
background-color: var(--cwc-blue-background);
69+
background: linear-gradient(
70+
45deg,
71+
var(--cwc-blue-background) 10px,
72+
var(--cwc-bg-tertiary) 40px
73+
);
7874
--theme-description-color: var(--cwc-blue-foreground-dimmed);
79-
80-
.action:hover {
81-
background-color: var(--cwc-blue-background);
82-
}
8375
}
8476

8577
.theme-purple {
8678
color: var(--cwc-purple-foreground);
87-
background-color: var(--cwc-purple-background);
79+
background: linear-gradient(
80+
45deg,
81+
var(--cwc-purple-background) 10px,
82+
var(--cwc-bg-tertiary) 40px
83+
);
8884
--theme-description-color: var(--cwc-purple-foreground-dimmed);
89-
90-
.action:hover {
91-
background-color: var(--cwc-purple-background);
92-
}
9385
}
9486

9587
.content {
@@ -142,8 +134,9 @@
142134
cursor: pointer;
143135
white-space: nowrap;
144136
padding: 0 7px 0 4px;
137+
color: var(--cwc-text-color);
145138

146139
&:hover {
147-
background-color: var(--vscode-list-hoverBackground);
140+
background-color: var(--cwc-bg-tertiary);
148141
}
149142
}

0 commit comments

Comments
 (0)