Skip to content

Commit

Permalink
fix(a11y): mobile and theme switcher (#2354)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed May 10, 2023
1 parent 97065ce commit d6c0985
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 6 additions & 0 deletions src/client/theme-default/components/VPNavBar.vue
Expand Up @@ -175,6 +175,12 @@ const classes = computed(() => ({
}
}
@media (max-width: 768px) {
.content-body {
column-gap: 0.5rem;
}
}
.menu + .translations::before,
.menu + .appearance::before,
.menu + .social-links::before,
Expand Down
Expand Up @@ -61,7 +61,7 @@ defineProps<{
align-items: center;
margin: 0;
padding: 0;
width: 32px;
width: 48px;
height: 55px;
background: transparent;
transition: border-color 0.25s;
Expand Down
19 changes: 9 additions & 10 deletions src/client/theme-default/components/VPSwitchAppearance.vue
Expand Up @@ -75,16 +75,15 @@ watch(checked, (newIsDark) => {
</script>

<template>
<label title="toggle dark mode">
<VPSwitch
class="VPSwitchAppearance"
:aria-checked="checked"
@click="toggle"
>
<VPIconSun class="sun" />
<VPIconMoon class="moon" />
</VPSwitch>
</label>
<VPSwitch
title="toggle dark mode"
class="VPSwitchAppearance"
:aria-checked="checked"
@click="toggle"
>
<VPIconSun class="sun" />
<VPIconMoon class="moon" />
</VPSwitch>
</template>

<style scoped>
Expand Down

0 comments on commit d6c0985

Please sign in to comment.