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

Use calc-size in .active > .nav-child #849

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

stevenjoezhang
Copy link
Member

PR Checklist

  • The changes have been tested (for bug fixes / features).
  • Docs in NexT website have been added / updated (for features).

PR Type

  • Bugfix.
  • Feature.
  • Improvement.
  • Code style update (e.g. formatting, linting).
  • Refactoring (no changes to functionality and APIs).
  • Documentation.
  • Translation.
  • Other... Please describe:

What is the current behavior?

#323 introduced a transition animation for TOC, and due to the need to calculate heights, the author @PaperStrike wrote the algorithm in JavaScript. However, it is not accurate when encountering collapsed rows (#772) and no better solution has been found. I noticed that this issue might be resolved using the newly introduced calc-size in CSS, but it is currently only supported by Chrome and Edge versions 129 and above. We may need to wait until it is supported by other mainstream browsers (such as Safari and Firefox) before merging. You are welcome to test the TOC animation effects on the latest versions of Chrome and Edge.

Issue resolved:

What is the new behavior?

  • Link to demo site with this changes:
  • Screenshots with this changes:

How to use?

In NexT _config.yml:

@coveralls
Copy link

coveralls commented Nov 21, 2024

Pull Request Test Coverage Report for Build 11959817132

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.451%

Totals Coverage Status
Change from base Build 11946755901: 0.0%
Covered Lines: 400
Relevant Lines: 405

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants