Removing default list-style
and -webkit-details-marker
from the <summary> element.
#13614
davidlbowman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the rise of React Server Components, removing the client-side state and relying upon static site generation on the server is becoming increasingly important. A common example is an Accordion component, which generally uses
useState
to open and close the Accordion. However, this forces you to use state and client-side components.Instead, we can use the
<details>
and<summary>
HTML elements to develop Accordions without state. However, iOS devices contain a default display icon for-webkit-details-marker
. It's easy to miss this if you don't have an iOS device to test on.You can solve this using CSS:
You can see an example of this on my website https://www.theinnovationlab.dev/partnerships
Or, here's the source code for the Accordion:
Beta Was this translation helpful? Give feedback.
All reactions