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

Revert “Prevent Preflight from affecting list semantics” #13907

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

benface
Copy link
Contributor

@benface benface commented Jun 27, 2024

Unfortunately, I realized after my previous PR (#13815) got merged that there is one case where there is a visual difference between list-style: none and list-style: "", which is when the <li> is empty. With list-style: "", it still takes up space, as you can see in this CodePen: https://codepen.io/benface/pen/MWdRdyY. I guess we'll have to keep using role="list" when we want to keep the list semantics.

@thecrypticace
Copy link
Contributor

thecrypticace commented Jun 28, 2024

Just thinking out loud but we could target those explicitly like this (would need to tweak the selector for specificity reasons tho):

:is(ol, ul, menu) li:empty { list-style-type: none; }

@benface
Copy link
Contributor Author

benface commented Jun 28, 2024

Haha, yeah, I suppose... but what about <li> </li>? I guess that :empty is supposed to match elements with only whitespace, but no browser supports it yet.

@adamwathan
Copy link
Member

Sad but thanks for catching 😄

@adamwathan adamwathan merged commit 3b85780 into tailwindlabs:next Jul 4, 2024
1 check passed
@benface benface deleted the benface/revert-list-style branch July 4, 2024 15:25
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.

None yet

3 participants