Skip to content

Commit

Permalink
fix: optimize tag style (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolking authored Oct 12, 2024
1 parent 0c10060 commit b7a2a4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/components/VPTagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,17 @@ function handleChange(event: Event) {
--vp-tag-hover-bg: var(--vp-button-brand-hover-bg);
--vp-tag-hover-text: var(--vp-button-brand-hover-text);
}
.tag-item > .visually-hidden:focus-visible + .item-inner {
outline: 2px solid var(--vp-tag-bg);
outline-offset: 1px;
}
.tag-item .item-inner {
padding: 0.4rem 1rem;
border-radius: 0.5rem;
border: 1px solid var(--vp-tag-border);
background-color: var(--vp-tag-bg);
color: var(--vp-tag-text);
cursor: pointer;
transition: var(--vp-transition-all);
}
.tag-item .item-inner:hover {
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Tag.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useData, useRoute, withBase } from 'vitepress'
import { useData, useRoute, withBase, type DefaultTheme } from 'vitepress'
import { useTag } from '../composables/index'
import VPCover from '../components/VPCover.vue'
import VPTagList from '../components/VPTagList.vue'
Expand All @@ -22,7 +22,7 @@ const title = computed(() => {
})
if (nav) {
return nav.text
return (nav as DefaultTheme.NavItemWithLink).text
} else {
const layout: string = frontmatter.value.layout
return layout.replace(/^([a-z])/, (_, i) => i.toUpperCase())
Expand Down
5 changes: 0 additions & 5 deletions src/styles/public.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
margin-right: calc(0px - var(--vp-size-space));
}

a:focus-visible,
button:focus-visible {
outline-color: var(--vp-c-brand-lighter);
}

@media (min-width: 768px) {
.main {
padding-left: calc(var(--vp-size-space) * 2);
Expand Down

0 comments on commit b7a2a4e

Please sign in to comment.