Skip to content

Commit 94c0003

Browse files
authored
Fix a number of light mode issues and get rid of scrollbar jumping on menus (#4760)
* Fix DEV-466, Fixes #4692 as well as a bunch of other poor contrast and inconsistency issues in light mode. Adds shadows to buttons and makes scrollbar gutter stable. * lintttt & only do scrollbar gutter on website * try to fix following hydration issue * try another clientonly approach * fix home page link animation * lint * remove dropdown style from checkbox & improve shadow consistency * liiiint
1 parent c27f787 commit 94c0003

40 files changed

+384
-693
lines changed

apps/app-frontend/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ provideAppUpdateDownloadProgress(appUpdateDownload)
765765
>
766766
<LibraryIcon />
767767
</NavButton>
768-
<div class="h-px w-6 mx-auto my-2 bg-button-bg"></div>
768+
<div class="h-px w-6 mx-auto my-2 bg-surface-5"></div>
769769
<suspense>
770770
<QuickInstanceSwitcher />
771771
</suspense>

apps/app-frontend/src/components/ui/AccountsCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ onUnmounted(() => {
284284
z-index: 11;
285285
gap: 0.5rem;
286286
padding: 1rem;
287-
border: 1px solid var(--color-button-bg);
287+
border: 1px solid var(--color-divider);
288288
width: max-content;
289289
user-select: none;
290290
-ms-user-select: none;
@@ -380,7 +380,7 @@ onUnmounted(() => {
380380
text-align: left;
381381
382382
&.expanded {
383-
border: 1px solid var(--color-button-bg);
383+
border: 1px solid var(--color-divider);
384384
padding: 1rem;
385385
}
386386
}

apps/app-frontend/src/components/ui/ContextMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ onBeforeUnmount(() => {
119119
background-color: var(--color-raised-bg);
120120
border-radius: var(--radius-md);
121121
box-shadow: var(--shadow-floating);
122-
border: 1px solid var(--color-button-bg);
122+
border: 1px solid var(--color-divider);
123123
margin: 0;
124124
position: fixed;
125125
z-index: 1000000;
@@ -163,7 +163,7 @@ onBeforeUnmount(() => {
163163
}
164164
165165
.divider {
166-
border: 1px solid var(--color-button-bg);
166+
border: 1px solid var(--color-divider);
167167
margin: var(--gap-sm);
168168
pointer-events: none;
169169
}

apps/app-frontend/src/components/ui/InstanceCreationModal.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</div>
3535
<div class="input-row">
3636
<p class="input-label">Game version</p>
37-
<div class="versions">
37+
<div class="flex gap-4 items-center">
3838
<multiselect
3939
v-model="game_version"
4040
class="selector"
@@ -45,7 +45,7 @@
4545
open-direction="top"
4646
:show-labels="false"
4747
/>
48-
<Checkbox v-model="showSnapshots" class="filter-checkbox" label="Show all versions" />
48+
<Checkbox v-model="showSnapshots" class="shrink-0" label="Show all versions" />
4949
</div>
5050
</div>
5151
<div v-if="loader !== 'vanilla'" class="input-row">
@@ -546,12 +546,6 @@ const next = async () => {
546546
font-style: italic;
547547
}
548548
549-
.versions {
550-
display: flex;
551-
flex-direction: row;
552-
gap: 1rem;
553-
}
554-
555549
:deep(button.checkbox) {
556550
border: none;
557551
}

apps/app-frontend/src/components/ui/QuickInstanceSwitcher.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ onUnmounted(() => {
6969
<SpinnerIcon class="animate-spin w-4 h-4" />
7070
</div>
7171
</NavButton>
72-
<div v-if="recentInstances.length > 0" class="h-px w-6 mx-auto my-2 bg-button-bg"></div>
72+
<div v-if="recentInstances.length > 0" class="h-px w-6 mx-auto my-2 bg-divider"></div>
7373
</template>
7474

7575
<style scoped lang="scss"></style>

apps/app-frontend/src/components/ui/RunningAppBar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ onBeforeUnmount(() => {
293293
align-items: center;
294294
gap: 0.5rem;
295295
border-radius: var(--radius-md);
296-
border: 1px solid var(--color-button-bg);
296+
border: 1px solid var(--color-divider);
297297
padding: var(--gap-sm) var(--gap-lg);
298298
}
299299
@@ -356,7 +356,7 @@ onBeforeUnmount(() => {
356356
gap: 1rem;
357357
overflow: auto;
358358
transition: all 0.2s ease-in-out;
359-
border: 1px solid var(--color-button-bg);
359+
border: 1px solid var(--color-divider);
360360
361361
&.hidden {
362362
transform: translateY(-100%);
@@ -454,7 +454,7 @@ onBeforeUnmount(() => {
454454
flex-direction: column;
455455
overflow: auto;
456456
transition: all 0.2s ease-in-out;
457-
border: 1px solid var(--color-button-bg);
457+
border: 1px solid var(--color-divider);
458458
padding: var(--gap-md);
459459
460460
&.hidden {

apps/app-frontend/src/components/ui/world/InstanceItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ onUnmounted(() => {
130130
/>
131131
</template>
132132
<div
133-
class="grid grid-cols-[auto_minmax(0,3fr)_minmax(0,4fr)_auto] items-center gap-2 p-3 bg-bg-raised rounded-xl smart-clickable:highlight-on-hover"
133+
class="grid grid-cols-[auto_minmax(0,3fr)_minmax(0,4fr)_auto] items-center gap-2 p-3 bg-bg-raised card-shadow rounded-xl smart-clickable:highlight-on-hover"
134134
>
135135
<Avatar
136136
:src="instanceIcon ? convertFileSrc(instanceIcon) : undefined"

apps/app-frontend/src/components/ui/world/WorldItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const messages = defineMessages({
181181
/>
182182
</template>
183183
<div
184-
class="grid grid-cols-[auto_minmax(0,3fr)_minmax(0,4fr)_auto] items-center gap-2 p-3 bg-bg-raised smart-clickable:highlight-on-hover rounded-xl"
184+
class="grid grid-cols-[auto_minmax(0,3fr)_minmax(0,4fr)_auto] items-center gap-2 p-3 bg-bg-raised card-shadow smart-clickable:highlight-on-hover rounded-xl"
185185
:class="{
186186
'world-item-highlighted': highlighted,
187187
}"

apps/app-frontend/src/pages/Skins.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ await Promise.all([loadCapes(), loadSkins(), loadCurrentUser()])
427427

428428
<div v-else class="flex items-center justify-center min-h-[50vh] pt-[25%]">
429429
<div
430-
class="bg-bg-raised rounded-lg p-7 flex flex-col gap-5 shadow-md relative max-w-xl w-full mx-auto"
430+
class="bg-bg-raised card-shadow rounded-lg p-7 flex flex-col gap-5 shadow-md relative max-w-xl w-full mx-auto"
431431
>
432432
<img
433433
:src="ExcitedRinthbot"

apps/frontend/src/assets/styles/components.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,3 +1290,7 @@ svg.inline-svg {
12901290
}
12911291
}
12921292
}
1293+
1294+
.card-shadow {
1295+
box-shadow: var(--shadow-card);
1296+
}

0 commit comments

Comments
 (0)