Skip to content

Commit 890023e

Browse files
committed
Added David Baron's proposal for region-based styling in
css-overflow-3, which limits such styling to inherited properties.
1 parent 1eb2b13 commit 890023e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

css-template/Overview.src.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,11 +4008,23 @@ <h4 id=select-after-pseudo>Style the contents of slots (region-based
40084008
would mean that 'P::first-line EM' is also valid and selects the parts
40094009
of an EM that are rendered on the first line of a P.
40104010

4011+
<p>Another possibility might be to set styles on '::slot()' itself and
4012+
only rely on inheritance. (This is what is proposed by David Baron in
4013+
[[CSS-OVERFLOW-3]].) Elements inside a grid element then inherit from
4014+
the slot inside which they are, before they inherit from the grid
4015+
element itself.
4016+
40114017
<p>Yet another possibility is a generic 'region()' pseudo-element:
40124018

40134019
<pre>P::region(BODY::slot(c)) { color: yellow }
40144020
EM::region(P::first-line) { font-weight: normal }</pre>
40154021

4022+
<p>And [[CSS3-REGIONS]] proposes an at-rule, '@region':
4023+
4024+
<pre>@region ::slot(a) {
4025+
P {font-size: large}
4026+
}</pre>
4027+
40164028
<p>Note that the specificity of the different alternative selectors
40174029
would not be the same. [[CSS3-REGIONS]] defines that the selector
40184030
immediately after '@region' does not add specificity. In other words,

0 commit comments

Comments
 (0)