Great post on style invalidation in Blink, written by Byungwoo who implemented :has()
in Blink.
Search results for: has()
How Blink invalidates styles when
Sibling Scopes in CSS, thanks to :has()
and ~
CSS :has()
feature detection with @supports(selector(…))
: You want :has(+ *)
, not :has(*)
A :nth-child(An+B [of S]?)
polyfill thanks to CSS :has()
and :not()
Detect “islands of elements” with the same class, thanks to CSS :has()
Style a parent element based on its number of children using CSS :has()
Magic PostCSS Custom Combinators using :has()
Similar to how you can (ab)use :nth-child() to create “new” CSS selectors, you can leverage :has() to create some typical combinators. Brandon McConnell did just that: y:has(+ x) selects the first preceding y sibling of x: y:has(~ x) selects all preceding y sibling of x: x + y, y:has(+ x) selects the first preceding and …
Continue reading “Magic PostCSS Custom Combinators using :has()
“
The CSS :has()
selector is way more than a “Parent Selector”
What’s new in CSS? (2023.10.12 @ Frontmania)
Style Recalculation Secrets They Don’t Want You To Know | Patrick Brosset | CSS Day 2023
This talk by Patrick Brosset is one of my favorite talks from this year’s CSS Day Conference. How do browsers actually recalculate styles when webpages change? Can the way you write CSS impact the speed of the recalculation process? In this talk, we’ll go through the details of how browser engines react to DOM changes …