Skip to content

Conversation

@benface
Copy link
Contributor

@benface benface commented Jun 9, 2024

The comment should be self-explanatory. I learned this trick thanks to Sara Soueidan's talk at CSS Day. 🙃

@thecrypticace
Copy link
Contributor

Looks like using list-style: "" works too given that the semantics are lost when the type is set to none and since it's set to "" they stay around. Interestingly some screen readers don't seem to care if none is used but some other ones do so this seems like a good change. 👍

@thecrypticace thecrypticace merged commit 332347e into tailwindlabs:next Jun 14, 2024
@benface benface deleted the patch-1 branch June 15, 2024 15:34
@sntran
Copy link
Contributor

sntran commented Jun 22, 2024

How would we go about re-adding it? For example, we want the <ul> to have bullet on desktop but not on tablet, while wanting to keep its sematics, i.e., can't do md:list-none

@benface
Copy link
Contributor Author

benface commented Jun 22, 2024

Huh, good point @sntran. I guess you can do md:list-[''] or customize your theme to have { listStyleType: { none: "''" } }. But I wonder if that should be changed in the default theme @thecrypticace?

tongrow pushed a commit to tongrow/tailwind-normalize that referenced this pull request Jun 2, 2025
* Prevent Preflight from affecting list semantics

* Use `list-style` property

* Update snapshots

* Update changelog

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
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.

3 participants