Lea Verou on Nostr: Realization: CSS Nesting also allows you to basically do "else" clauses in selectors. ...
Realization: CSS Nesting also allows you to basically do "else" clauses in selectors.
complex-selector {
if-styles;
:not(&) {
else-styles
}
}
Published at
2024-02-12 19:39:35Event JSON
{
"id": "8f373031ff1f19db428c009c8f727eb487937fdfa0ab84fe73dac399daa5ea40",
"pubkey": "deb27057e60b8d796302849309a7c542aa1c718108be4813086deaf9139dff76",
"created_at": 1707766775,
"kind": 1,
"tags": [
[
"proxy",
"https://front-end.social/users/leaverou/statuses/111920203377359401",
"activitypub"
]
],
"content": "Realization: CSS Nesting also allows you to basically do \"else\" clauses in selectors.\n\ncomplex-selector {\n if-styles;\n\n :not(\u0026) {\n else-styles\n }\n}\n\nhttps://cdn.masto.host/frontendsocial/media_attachments/files/111/920/192/173/593/697/original/c4df6e0df7132180.png",
"sig": "258df37b0ac1c204096ed05f26a3f85626fa7ff5ba2586236c9d38ad84b08b389ab3625bb822584b02ac56154ff119818915b1947fc052986e399ffc43e9f922"
}