-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Type of Change
Feature
Summary
The CSS :has
psuedo-selector is neat new CSS feature (almost*) available in all browsers and can [come in pretty handy]
(https://twitter.com/wesbos/status/1653401308022607874?s=43&t=23JfvPjOIJyZ9W8iFiZYyg).
https://www.smashingmagazine.com/2023/01/level-up-css-skills-has-selector/
/* Selects an h1 heading with a
paragraph element that immediately follows
the h1 and applies the style to h1 */
h1:has(+ p) {
margin-bottom: 0;
}
It is still outstanding in FF but will be coming soon but it is a standard now, so no harm in supporting it in Greenwood
https://caniuse.com/css-has
Details
So will just need to add support for this in our CSS resource plugin and add a test case.