[csswg-drafts] [css-pseudo] Pseudo Style apply-style-this-element-only Inheritance Control styles, margin padding, background colors.. (#11440)

wesleyolis has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo] Pseudo Style apply-style-this-element-only Inheritance Control styles, margin padding, background colors.. ==
Basically control the propagation and inheritance of styles more granular and specifically, because one is not really able to write selectors to be more specific in more complex situations it becomes difficult.

div:apply-style-this-element-only {
margin: 10px;
font-size:1.2em;
}

This would only apply the style to first div element/template and not its contained children elements.

```.html

<style>
div {
font-size:1em;
}

div.normal:apply-style-this-element-only {
font: 1.2em;
}
<style>

<div class='normal'>
Normal fontisze of 1.2em
<div >
larger fontsize of default 1 em
</div>
</div>

```





Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11440 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 5 January 2025 08:25:50 UTC