Raindrop.io Bookmarks 05/08/2024
著
- The shortest selector for the root element
"To target the html element, you either use "html{}" or ":root{}" but thanks to CSS nesting you can simply use "&{}"
- A Brief Note on Highlighted Text -- Adrian Roselli
"If you plan to style text highlighted by the browser, you must give it sufficient contrast -- 3:1 for the highlight block against its background and (probably) 4.5:1 for the text within that highlighted block against that background."
- Web Components from early 2024 · Chris Burnell
"I've been having a lot of fun creating reusable Web Components, so here are three that I've built and been using this so far this year."
- DDA Primer: Australia's Disability Discrimination Act - TPGi
"As of 2024, the Commission was working to update this guidance language to reflect the latest WCAG 2.2 version."
- nonce - HTML: HyperText Markup Language | MDN
"The nonce global attribute is a content attribute defining a cryptographic nonce ("number used once") which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed for a given element."
- A quick light-dark() experiment - daverupert.com
"The nice thing about using light-dark() at the root token level is your components can be dumber. You provide default light-dark experience and, like good children, your components abide in their parent's decision."
- Misconceptions about CSS Specificity - Bram.us
"To remove some of the confusion, here's a list of misconceptions about Specificity in CSS"