Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] enhance focus ring style consistency #3286

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/shiny-dolphins-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'nextra-theme-docs': patch
'nextra': patch
---

Enhance focus ring style consistency.
1 change: 1 addition & 0 deletions packages/nextra-theme-docs/src/components/skip-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const SkipNavLink = forwardRef<HTMLAnchorElement, SkipNavLinkProps>(
? styled // Give the user a way to opt-in the default style provided with the theme. Probably remove this option in the next major version (v3.x) and just do a check to use the providedClassName or the default
? cn(
'_sr-only',
'nextra-focus',
'focus:_not-sr-only focus:_fixed focus:_z-50 focus:_m-3 focus:_ml-4 focus:_h-[calc(var(--nextra-navbar-height)-1.5rem)] focus:_rounded-lg focus:_border focus:_px-3 focus:_py-2 focus:_align-middle focus:_text-sm focus:_font-bold',
'focus:_text-gray-900 focus:dark:_text-gray-100',
'focus:_bg-white focus:dark:_bg-neutral-900',
Expand Down
1 change: 1 addition & 0 deletions packages/nextra/src/client/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export function Tabs({
className={({ selected, disabled, hover, focus }) =>
cn(
focus && 'nextra-focusable _ring-inset',
selected && '_outline-none',
'_whitespace-nowrap',
'_rounded-t _p-2 _font-medium _leading-5 _transition-colors',
'_-mb-0.5 _select-none _border-b-2',
Expand Down
Loading