withastro / starlight

🌟 Build beautiful, accessible, high-performance documentation websites with Astro
https://starlight.astro.build
MIT License
5.01k stars 532 forks source link

Summary's marker have not be hidden #1865

Closed subframe7536 closed 6 months ago

subframe7536 commented 6 months ago

What version of starlight are you using?

latest

What version of astro are you using?

latest

What package manager are you using?

pnpm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

image

Using summary::marker with display: none to hide is ineffective. Should use with list-style: none in summary

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics

Participation

HiDeoo commented 6 months ago

Thanks for your report.

Indeed, <details> and <summary> elements are not styled at all at the moment but this should be fixed by #1735.

Edit: Or maybe, as I did not find any usage of <details> and <summary> in the linked reproduction, you are talking about the sidebar? The screenshot may hint that but I'm not entirely sure.

Would you be able to provide more context regarding the issue?

subframe7536 commented 6 months ago

Sure, I add a comment in your PR

HiDeoo commented 6 months ago

Just tried using Chrome on a Windows machine and I cannot repro the issue using your repro link, the Starlight documentation or the preview page from the linked PR.

In the screenshot you provided, is this from a local reproduction? Is this the Starlight online documentation? Is this a sidebar issue only?

Regarding the comment you left, do you have any source or reference for such change?

subframe7536 commented 6 months ago

repro: recording

subframe7536 commented 6 months ago

fix: recording

subframe7536 commented 6 months ago

reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#customizing_the_disclosure_widget

HiDeoo commented 6 months ago

Could you have any extension (maybe something related to styles, as I see you may be getting a custom font) that could add such a style to the element. Would you be able to test in a private window maybe with no extension enabled?

For example, I personally do not get that inline style on the summary elements in the Starlight documentation.

image image
subframe7536 commented 6 months ago

You are right. There is a global CSS injected by one of userscript in violent monkey, which is reference from tailwind css reset. Disable that and everything works