Skip to content

Commit

Permalink
feat(ui): add font size outline when focused (#2798)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Apr 12, 2024
1 parent 9fa8149 commit 14162f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions components/settings/SettingsFontSize.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function setFontSize(e: Event) {
<div flex items-center justify-between absolute w-full pointer-events-none>
<div
v-for="i in sizes.length" :key="i"
class="container-marker"
h-3 w-3
rounded-full bg-secondary-light
relative
Expand All @@ -48,6 +49,17 @@ function setFontSize(e: Event) {
</template>

<style>
input:focus + div .container-marker:has(> div)::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 2rem;
height: 2rem;
border: 2px solid var(--c-primary);
border-radius: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
--at-apply: bg-secondary-light rounded-full h1 op60;
}
Expand Down
8 changes: 5 additions & 3 deletions pages/settings/interface/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ useHydratedHead({
</div>
</template>
<div p6 flex="~ col gap6">
<label space-y-2>
<p font-medium>{{ $t('settings.interface.font_size') }}</p>
<div space-y-2>
<p font-medium>
{{ $t('settings.interface.font_size') }}
</p>
<SettingsFontSize select-settings />
</label>
</div>
<div space-y-2>
<p font-medium>
{{ $t('settings.interface.color_mode') }}
Expand Down

0 comments on commit 14162f8

Please sign in to comment.