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] avoid focus-visible style being cut off by overflow hidden #3149

Conversation

87xie
Copy link
Contributor

@87xie 87xie commented Aug 28, 2024

fixes #1432

Description

I noticed some adjustments to the focus-visible style in Auth.js related to Nextra, such as:

I think these adjustments could be applied more comprehensively within Nextra. For instance, Auth.js only targets the focus-visible style of the first-level sidebar items and the focus-visible style is not working well in the TOC either.

image

image

image

Screenshots

Sidebar

image

image

Tabs

image

TOC

image

image

Direction: rtl

image

image

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: b918b8e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:24pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2024 9:24pm

Copy link

vercel bot commented Aug 28, 2024

@87xie is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@@ -191,7 +191,7 @@ const config: DocsThemeConfig = {
},
toc: {
extraContent: (
<img alt="placeholder cat" src="https://placekitten.com/g/300/200" />
<img alt="placeholder cat" src="https://placecats.com/300/200" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In example/swr-site, placekitten seems to be down, so I replaced it with placecats.

<OnFocusItemContext.Provider
value={item => {
setFocused(item)
}}
>
<OnFocusItemContext.Provider value={setFocused}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the extra inline function is not needed.

@87xie 87xie changed the title [v3] avoid focus visible style being cut off by overflow hidden [v3] avoid focus-visible style being cut off by overflow hidden Aug 28, 2024
@@ -183,7 +183,7 @@ function FolderImpl({ item, anchors }: FolderProps): ReactElement {
)}
/>
</ComponentToUse>
<Collapse className="ltr:_pr-0 rtl:_pl-0 _pt-1" isOpen={open}>
<Collapse className="_p-1" isOpen={open}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To resolve a situation like this

image

@dimaMachina
Copy link
Collaborator

closed by #3160, thanks for the initial attempt 🙌

@87xie 87xie deleted the avoid-focus-visible-style-being-cut-off-by-overflow-hidden branch October 2, 2024 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants