Skip to content

Commit 027ab7c

Browse files
committed
Refactor CSS files by replacing custom SCSS variables for padding, font sizes, and border radii with their corresponding hardcoded pixel values to simplify styling
1 parent 46997c5 commit 027ab7c

43 files changed

Lines changed: 246 additions & 301 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
width: 16px;
66
background-color: var(--vscode-checkbox-background);
77
border: 1px solid var(--vscode-checkbox-border);
8-
border-radius: var(--border-radius-3px);
8+
border-radius: 3px;
99
position: relative;
1010
cursor: pointer;
1111
flex-shrink: 0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
background: var(--vscode-input-background);
1010
color: var(--vscode-input-foreground);
1111
border: 1px solid var(--cwc-border-color);
12-
padding: var(--padding-4px) var(--padding-8px);
13-
border-radius: var(--border-radius-4px);
12+
padding: 4px 8px;
13+
border-radius: 4px;
1414
cursor: pointer;
1515
width: 100%;
1616

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010

1111
&__inner {
1212
background-color: var(--vscode-quickInput-background);
13-
border-radius: var(--border-radius-8px);
13+
border-radius: 8px;
1414
border: 1px solid var(--vscode-widget-border);
1515
box-shadow: 0 0 8px 2px var(--vscode-widget-shadow);
16-
padding: var(--padding-4px);
16+
padding: 4px;
1717
}
1818
}
1919

2020
.item {
2121
display: flex;
2222
justify-content: space-between;
2323
align-items: center;
24-
gap: var(--padding-12px);
25-
padding: 0 var(--padding-6px);
24+
gap: 12px;
25+
padding: 0 6px;
2626
height: 24px;
2727
cursor: pointer;
2828
color: var(--vscode-quickInput-foreground);
2929
white-space: nowrap;
30-
border-radius: var(--border-radius-4px);
30+
border-radius: 4px;
3131

3232
&:hover,
3333
&[data-selected='true'] {
@@ -40,5 +40,5 @@
4040

4141
.shortcut {
4242
color: var(--vscode-descriptionForeground);
43-
font-size: var(--font-size-12px);
43+
font-size: 12px;
4444
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
border: 1px solid var(--cwc-border-color);
33
background: var(--vscode-input-background);
44
color: var(--vscode-input-foreground);
5-
padding: var(--padding-4px) var(--padding-7px);
6-
border-radius: var(--border-radius-4px);
5+
padding: 4px 7px;
6+
border-radius: 4px;
77
width: 100%;
88
outline: none;
99

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
border: 1px solid var(--cwc-border-color);
33
background: var(--vscode-input-background);
44
color: var(--vscode-input-foreground);
5-
padding: var(--padding-4px) var(--padding-7px);
6-
border-radius: var(--border-radius-4px);
5+
padding: 4px 7px;
6+
border-radius: 4px;
77
width: 100%;
88
resize: none;
99
overflow: hidden;

‎packages/ui/src/components/editor/panel/BrowserExtensionMessage/BrowserExtensionMessage.module.scss‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
display: flex;
33
flex-direction: column;
44
align-items: flex-start;
5-
padding: var(--padding-6px) var(--padding-8px) var(--padding-8px)
6-
var(--padding-8px);
7-
margin-bottom: calc(var(--padding-5px) * -1);
5+
padding: 6px 8px 8px 8px;
6+
margin-bottom: calc(5px * -1);
87
background: linear-gradient(
98
135deg,
109
rgba(255, 0, 221, 0.1) 0%,
1110
rgba(37, 94, 209, 0.1) 100%
1211
);
1312
color: var(--vscode-inputOption-activeForeground);
14-
--border-radius: var(--border-radius-8px);
13+
--border-radius: 8px;
1514
border-top-left-radius: var(--border-radius);
1615
border-top-right-radius: var(--border-radius);
1716
}
@@ -28,7 +27,7 @@
2827
white-space: nowrap;
2928

3029
&:first-child {
31-
margin-right: var(--padding-10px);
30+
margin-right: 10px;
3231
}
3332
}
3433
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
display: flex;
33
align-items: center;
44
justify-content: center;
5-
gap: var(--padding-3px);
5+
gap: 3px;
66
min-height: 28px;
7-
font-size: var(--font-size-13px);
8-
padding: var(--padding-4px) var(--padding-16px);
7+
font-size: 13px;
8+
padding: 4px 16px;
99
font-family: system-ui, sans-serif;
1010
border: none;
11-
border-radius: var(--border-radius-4px);
11+
border-radius: 4px;
1212
cursor: pointer;
1313
background-color: var(--vscode-button-background);
1414
color: var(--vscode-button-foreground);
@@ -48,7 +48,7 @@
4848

4949
&--small {
5050
min-height: 24px;
51-
font-size: var(--font-size-12px);
52-
padding: var(--padding-2px) var(--padding-8px);
51+
font-size: 12px;
52+
padding: 2px 8px;
5353
}
5454
}

‎packages/ui/src/components/editor/panel/Configurations/Configurations.module.scss‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
.header {
77
height: var(--list-item-height);
8-
padding: 0 var(--padding-12px);
8+
padding: 0 12px;
99
display: flex;
1010
justify-content: space-between;
1111
align-items: center;
@@ -18,7 +18,7 @@
1818
&__left {
1919
display: flex;
2020
align-items: center;
21-
gap: var(--padding-4px);
21+
gap: 4px;
2222
}
2323

2424
&__right {
@@ -27,7 +27,7 @@
2727
}
2828

2929
.missing-config {
30-
padding: var(--padding-2px) var(--padding-12px) 0 var(--padding-12px);
30+
padding: 2px 12px 0 12px;
3131
font-weight: 500;
3232
font-style: italic;
3333
}
@@ -41,9 +41,9 @@
4141
display: flex;
4242
justify-content: space-between;
4343
align-items: center;
44-
gap: var(--padding-4px);
44+
gap: 4px;
4545
height: var(--list-item-height);
46-
padding: 0 var(--padding-12px);
46+
padding: 0 12px;
4747

4848
&:hover {
4949
background-color: var(--vscode-list-hoverBackground);
@@ -60,7 +60,7 @@
6060
&__left {
6161
display: flex;
6262
align-items: center;
63-
gap: var(--padding-5px);
63+
gap: 5px;
6464
overflow: hidden;
6565
white-space: nowrap;
6666
text-overflow: ellipsis;
@@ -124,8 +124,7 @@
124124

125125
.footer {
126126
display: flex;
127-
padding: var(--padding-8px) var(--padding-12px) var(--padding-12px)
128-
var(--padding-12px);
127+
padding: 8px 12px 12px 12px;
129128

130129
> button {
131130
flex: 1;

‎packages/ui/src/components/editor/panel/ContextUtilisation/ContextUtilisation.module.scss‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
.container {
22
display: flex;
33
align-items: center;
4-
gap: var(--padding-8px);
5-
padding: 0 var(--padding-10px);
4+
gap: 8px;
5+
padding: 0 10px;
66
color: var(--vscode-descriptionForeground);
77
}
88

99
.label {
10-
font-size: var(--font-size-11px);
10+
font-size: 11px;
1111
white-space: nowrap;
1212
}
1313

1414
.bar {
1515
flex: 1;
1616
height: 3px;
1717
background-color: var(--vscode-dropdown-border);
18-
border-radius: var(--border-radius-999px);
18+
border-radius: 999px;
1919
overflow: hidden;
2020

2121
&__progress {
2222
height: 100%;
2323
background-color: var(--vscode-focusBorder);
24-
border-top-right-radius: var(--border-radius-999px);
25-
border-bottom-right-radius: var(--border-radius-999px);
24+
border-top-right-radius: 999px;
25+
border-bottom-right-radius: 999px;
2626

2727
&--warning {
2828
background-color: var(--vscode-editorWarning-foreground);

‎packages/ui/src/components/editor/panel/Dropdown/Dropdown.module.scss‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
.button {
66
display: flex;
77
align-items: center;
8-
gap: var(--padding-3px);
9-
padding: 0 var(--padding-5px) 0 var(--padding-7px);
8+
gap: 3px;
9+
padding: 0 5px 0 7px;
1010
height: 24px;
1111
border: 1px solid var(--cwc-border-color-dimmed);
12-
border-radius: var(--border-radius-4px);
12+
border-radius: 4px;
1313
cursor: pointer;
1414
color: var(--vscode-foreground);
1515
width: 100%;
@@ -28,18 +28,18 @@
2828
white-space: nowrap;
2929
flex-grow: 1;
3030
text-align: left;
31-
font-size: var(--font-size-13px);
31+
font-size: 13px;
3232
}
3333

3434
&__info {
35-
font-size: var(--font-size-11px);
35+
font-size: 11px;
3636
color: var(--vscode-descriptionForeground);
3737
white-space: nowrap;
38-
padding-left: var(--padding-3px);
38+
padding-left: 3px;
3939
}
4040

4141
&__icon {
42-
font-size: var(--font-size-14px) !important;
42+
font-size: 14px !important;
4343
color: var(--vscode-icon-foreground);
4444
}
4545
}

0 commit comments

Comments
 (0)