Skip to content

Commit 625082e

Browse files
authored
refactor-remove-unused-css-variables (#11576)
* refactor(ui): remove unused css classes * fix broken variables * update hover variables * feat(ui): replace 'error' with 'danger' modal type * style: Replace hardcoded hover color with CSS variable to enable themeability
1 parent ad2736f commit 625082e

File tree

70 files changed

+148
-523
lines changed

Some content is hidden

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

70 files changed

+148
-523
lines changed

apps/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@anthropic-ai/sdk": "^0.59.0",
2727
"@gitbutler/core": "workspace:*",
28-
"@gitbutler/design-core": "1.5.1",
28+
"@gitbutler/design-core": "1.6.0",
2929
"@gitbutler/shared": "workspace:*",
3030
"@gitbutler/svelte-comment-injector": "workspace:*",
3131
"@gitbutler/ui": "workspace:*",

apps/desktop/src/components/BranchCommitList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
cursor: pointer;
456456
457457
&:not(.selected):hover {
458-
background: var(--clr-bg-1-muted);
458+
background: var(--hover-bg-1);
459459
}
460460
461461
&:first-child {

apps/desktop/src/components/BranchHeader.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
243243
/* Selected but NOT in focus */
244244
&:hover {
245-
--branch-selected-bg: var(--clr-bg-1-muted);
245+
--branch-selected-bg: var(--hover-bg-1);
246246
247247
& .branch-header__drag-handle {
248248
width: 16px;

apps/desktop/src/components/BranchLabel.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
&:not([readonly]):not([disabled]):focus {
183183
border: 1px solid color-mix(in srgb, var(--clr-text-1), transparent 70%);
184184
outline: none;
185-
background-color: var(--hover-bg);
185+
background-color: var(--hover-bg-1);
186186
}
187187
188188
&[disabled] {

apps/desktop/src/components/ChromeHeader.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@
226226
<div class="chrome-current-branch">
227227
<div class="chrome-current-branch__content">
228228
<Icon name="branch-remote" color="var(--clr-text-2)" />
229-
<span class="text-12 text-semibold clr-text-1 truncate">{currentBranchName}</span>
229+
<span class="text-12 text-bold clr-text-2 truncate">{currentBranchName}</span>
230230
{#if isNotInWorkspace}
231-
<span class="text-12 text-semibold clr-text-2"> read-only </span>
231+
<span class="text-12 text-bold clr-text-2 op-60"> read-only </span>
232232
{/if}
233233
</div>
234234
</div>
@@ -327,7 +327,6 @@
327327
border-left: none;
328328
border-top-right-radius: 100px;
329329
border-bottom-right-radius: 100px;
330-
background-color: var(--clr-bg-2-muted);
331330
}
332331
333332
.chrome-current-branch__content {
@@ -336,7 +335,7 @@
336335
overflow: hidden;
337336
gap: 4px;
338337
text-wrap: nowrap;
339-
opacity: 0.7;
338+
opacity: 0.8;
340339
}
341340
342341
.chrome-left {

apps/desktop/src/components/CodegenRow.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
183183
&.active.selected,
184184
&[type='button']:hover {
185-
background-color: var(--clr-theme-purple-bg-muted);
185+
background-color: var(--hover-purple-bg);
186186
}
187187
}
188188

apps/desktop/src/components/CommitFailedModalContent.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<div class="commit-failed__wrapper">
7070
<ModalHeader
7171
sticky={!isScrollTopVisible}
72-
type={data.newCommitId ? 'warning' : 'error'}
72+
type={data.newCommitId ? 'warning' : 'danger'}
7373
closeButton
7474
{oncloseclick}
7575
closeButtonTestId={TestId.GlobalModalActionButton}

apps/desktop/src/components/CommitRow.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
206206
&:hover,
207207
&.menu-shown {
208-
background-color: var(--clr-bg-1-muted);
208+
background-color: var(--hover-bg-1);
209209
}
210210
211211
&:hover .commit-row__drag-handle {
@@ -234,7 +234,7 @@
234234
235235
&:not(.selected):hover,
236236
&.menu-shown {
237-
background-color: var(--clr-theme-danger-bg-muted);
237+
background-color: var(--hover-danger-bg);
238238
}
239239
240240
.commit-name {
@@ -332,7 +332,7 @@
332332
padding: 0 4px;
333333
border: 1px solid var(--clr-border-2);
334334
border-radius: var(--radius-ml);
335-
background-color: var(--clr-bg-1-muted);
335+
background-color: var(--clr-bg-muted);
336336
color: var(--clr-text-2);
337337
line-height: 1;
338338
cursor: pointer;

apps/desktop/src/components/DialogBubble.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
.bubble-wrap {
8787
display: flex;
8888
flex-direction: column;
89-
9089
width: 100%;
9190
padding: 0 16px;
9291
@@ -117,7 +116,7 @@
117116
118117
& .bubble__header,
119118
& .bubble-message {
120-
background-color: var(--clr-theme-pop-bg-muted);
119+
background-color: var(--clr-theme-pop-bg);
121120
}
122121
}
123122

apps/desktop/src/components/FilePreviewPlaceholder.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
height: 520px;
3131
transform: translate(-50%, -50%);
3232
border-radius: 100%;
33-
background-color: red;
3433
background: radial-gradient(var(--clr-bg-2) 10%, oklch(from var(--clr-bg-2) l c h / 0) 50%);
3534
content: '';
3635
transition: opacity 0.1s;

0 commit comments

Comments
 (0)