Skip to content

Conversation

@YDX-2147483647
Copy link
Member

@YDX-2147483647 YDX-2147483647 commented Oct 31, 2025

This PR fixes a compatibility issue on Safari.

We replace the default triangle marker with <ChevronRightIcon/> for collapsible blocks (<details>/<summary>).
On Firefox/Chrome, <summary class="flex"> will clear the default triangle marker.
But on Safari, we have to add marker:hidden. (Safari has another quirk. It uses summary::-webkit-details-marker instead of summary::marker, but Tailwind CSS make it compatible for us.)

Before:

After:

@netlify
Copy link

netlify bot commented Oct 31, 2025

Deploy Preview for typst-docs-web ready!

Name Link
🔨 Latest commit 677f61b
🔍 Latest deploy log https://app.netlify.com/projects/typst-docs-web/deploys/6904d9060982ec000840ff05
😎 Deploy Preview https://deploy-preview-31--typst-docs-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@3w36zj6
Copy link
Member

3w36zj6 commented Oct 31, 2025

https://deploy-preview-31--typst-docs-web.netlify.app/

I tried to check on an iOS device, but this Deploy Preview link returns a 404 error.

Additional note: #30 has been merged.

@YDX-2147483647
Copy link
Member Author

this Deploy Preview link returns a 404 error.

Because the build script didn't exist on this branch.

I have just merged main. Please retry.

@YDX-2147483647 YDX-2147483647 changed the title fix: hide details markers for Safari fix: hide default details markers for Safari Oct 31, 2025
Copy link
Member

@3w36zj6 3w36zj6 left a comment

Choose a reason for hiding this comment

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

LGTM

@3w36zj6 3w36zj6 requested a review from Copilot October 31, 2025 22:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the visual presentation of collapsible sections by hiding the default browser disclosure markers. The marker:hidden Tailwind CSS class is added to three <summary> elements that use custom chevron icons for disclosure indicators.

  • Added marker:hidden class to <summary> elements in collapsible details sections
  • Ensures only the custom ChevronRightIcon is visible, without browser default markers
  • Applied consistently across function examples and string value sections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/ui/FunctionParameters.tsx Added marker:hidden to two <summary> elements (example folding and string values sections) to hide default disclosure markers
src/components/ui/FunctionDisplay.tsx Added marker:hidden to the example folding <summary> element to hide default disclosure marker

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@3w36zj6 3w36zj6 merged commit b436008 into typst-community:main Nov 1, 2025
20 checks passed
@YDX-2147483647 YDX-2147483647 deleted the marker branch November 1, 2025 04:39
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