Style the open/close markers of the summary element
Yesterday I wrote about the details/summary elements and how you can make them mutually exclusive).
Cheddar
Do you know Cheddar is one of the most nutritious cheese varieties? This is because it is loaded with high protein and calories. Its origin is from various parts of England, named after the Cheddar village. The taste and sourness increase with age. This is not very creamy and is often used in grills and main cheese courses.
Feta
This salt and sour cheese were first made in Greece by blending sheep and goat milk. Some varieties of feta cheese are purely made of goat milk only. It is the first choice for salads and soups as it is creamy and has a good nutrient profile.
Mozzarella
Mozzarella is the most familiar cheese variety in the world. It is used in popular foods like pizzas, pasta, lasagne, sandwiches, etc. It has its root in the southern part of Italy, and its traditional form involves Buffalo milk.
Today you will see how you can style these elements in a nice and funny way.
(Please click them! 🖱️👆)
Books
Developers wrestled softly through tangled webpack branches, whispering nullable promises into silent repositories. API endpoints danced reluctantly, spinning semantic branches while middleware trembled beneath cascading functions.
Photos
Frontend components whispered complex secrets, rendering impossible dreams across distributed landscapes. Typescript interfaces sang melancholic type definitions, dancing between abstract classes and concrete implementations.
Letters
Webpack loaders shuffled silently, transforming raw intentions into compressed bundles of potential meaning. GraphQL mutations whispered their queries, translating impossible conversations between distant system realms.
You can do this by setting the ::marker
of the summary
element, and changing it for open elements (using the open attribute selector as ancestor).
summary::marker { content: "😺"; }
[open] summary::marker { content: "🦁";}
The ::marker
pseudo-element is used on lists as well.
Safari only supports changing its color
and font-size
, but not the content
.
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/::marker