Skip to content

Commit

Permalink
グローバルナビで現在カテゴリーの場合 aria-current=true にする
Browse files Browse the repository at this point in the history
  • Loading branch information
SaekiTominaga committed Aug 11, 2024
1 parent eb4b2ce commit af52c28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion astro/src/layouts/include/PageHeaderTokyu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const { pagePath, top = false } = Astro.props;
</a>
)}
{page.path !== pagePath && pagePath.startsWith(page.path) && (
<a href={page.path} class="p-header-gnav__link -my-category">
<a href={page.path} aria-current="true" class="p-header-gnav__link">
{page.name}
</a>
)}
Expand Down
5 changes: 1 addition & 4 deletions astro/style/object/project/_header.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@
}
}

&.-my-category {
}

&:is(:not(:any-link), .-my-category) {
&[aria-current] {
--_border-width: 2px;
--_border-color: var(--color-red);

Expand Down

0 comments on commit af52c28

Please sign in to comment.