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

Style improvements #811

Merged
merged 4 commits into from
Sep 5, 2022
Merged

Style improvements #811

merged 4 commits into from
Sep 5, 2022

Conversation

shuding
Copy link
Owner

@shuding shuding commented Sep 5, 2022

  • Make sure that commands like dev:theme-docs don't trigger the v2 docs package
  • Improve iOS Safari style as 100dvh is now out
  • Fix links with empty href
  • Preload search index file
  • Fix search result clickable area
  • Fix theme icon size
  • Fix dir=ltr missing before hydration (layout jumps)

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2022

🦋 Changeset detected

Latest commit: fb874e7

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

@vercel
Copy link

vercel bot commented Sep 5, 2022

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

Name Status Preview Updated
nextra-theme-docs-dev ✅ Ready (Inspect) Visit Preview Sep 5, 2022 at 6:05PM (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview Sep 5, 2022 at 6:05PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
nextra ⬜️ Ignored (Inspect) Sep 5, 2022 at 6:05PM (UTC)

@dimaMachina
Copy link
Collaborator

@shuding for rtl jumps I have a better solution here https://github.com/shuding/nextra/pull/803/files#diff-8310a54b1ec9da38ed7c74e8c1328e33f07848d25bd9779811614642e3268747R180-R194

since now switch/theme popups will render in body via react portals, and they are not children for root div

Comment on lines 257 to +258
.locale-switch[open] summary:before {
content: ' ';
content: '';
Copy link
Collaborator

@dimaMachina dimaMachina Sep 5, 2022

Choose a reason for hiding this comment

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

this class (.locale-switch) seems not used anywhere, not?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Oh right, that seems to be legacy

@@ -181,6 +181,7 @@ const Details = ({
<details
className="my-4 rounded border border-gray-200 bg-white p-2 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 first:mt-0 last:mb-0"
{...props}
{...(openState && { 'data-expanded': true })}
Copy link
Collaborator

Choose a reason for hiding this comment

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

data-expanded={openState} should works also

"before:content-[''] before:inline-block before:transition-transform dark:before:invert",
'[[open]>&]:before:rotate-90 rtl:before:rotate-180'
"before:mr-1 before:content-[''] before:inline-block before:transition-transform dark:before:invert",
'[[data-expanded]>&]:before:rotate-90 rtl:before:rotate-180'
Copy link
Collaborator

Choose a reason for hiding this comment

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

does previous didn't work? 🧐

Copy link
Owner Author

Choose a reason for hiding this comment

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

This makes sure that the arrow rotation animation isn’t delayed like the collapse animation

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice catch, remember that saw this issue :)

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