Skip to content

Commit ec8cf37

Browse files
committed
[css-ui-4] Sigh, inheritance *does* work on the flat tree, I'm dumb.
1 parent 4c51c53 commit ec8cf37

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

css-ui-4/Overview.bs

+10-24
Original file line numberDiff line numberDiff line change
@@ -1979,10 +1979,10 @@ Preventing All Interaction: the 'interactivity' property</h3>
19791979

19801980
<pre class=propdef>
19811981
Name: interactivity
1982-
Value: auto | normal | inert
1982+
Value: auto | inert
19831983
Initial: auto
19841984
Applies to: all elements
1985-
Inherited: no
1985+
Inherited: yes
19861986
Percentages: N/A
19871987
Computed Value: as specified
19881988
Animation type: discrete
@@ -1995,22 +1995,13 @@ are [=inert=] or not.
19951995
<dl dfn-type=value dfn-for=interactivity>
19961996
: <dfn>auto</dfn>
19971997
::
1998-
The element is [=inert=] if and only if
1999-
its [=flat tree=] parent is [=inert=].
2000-
2001-
: <dfn>normal</dfn>
2002-
:: The element is not [=inert=].
1998+
Unless otherwise specified by the host language,
1999+
the element is not [=inert=].
20032000

20042001
: <dfn>inert</dfn>
20052002
:: The element is [=inert=].
20062003
</dl>
20072004

2008-
Note: While 'interactivity' is not an [=inherited=] property,
2009-
by default (when set to ''interactivity/auto'')
2010-
it acts <em>similarly</em> to one,
2011-
except it "inherits" thru the [=flat tree=]
2012-
rather than the usual parent/child relationship.
2013-
20142005
<div algorithm>
20152006
When an [=element=] or [=text run=] is <dfn export>inert</dfn>:
20162007

@@ -2048,23 +2039,18 @@ In these instances, the <{input/disabled}> attribute is probably more appropriat
20482039

20492040
<pre highlight=css>
20502041
@scope ([inert]) to (X) {
2051-
interactivity: inert !important;
2042+
* {
2043+
interactivity: inert !important;
2044+
}
2045+
}
2046+
X {
2047+
interactivity: auto;
20522048
}
20532049
</pre>
20542050

20552051
Where the <css>X</css> represents a theoretical selector
20562052
matching any elements that "escape" inertness by default,
20572053
such as modal dialogs.
2058-
2059-
This prevents descendants of an element with the <{html-global/inert}> attribute
2060-
from being un-inerted,
2061-
but <em>does</em> allow elements that are [=flat tree=] descendants,
2062-
but not DOM tree descendants,
2063-
to be set non-inert.
2064-
For example, a light-tree element
2065-
slotted into an inert subtree in a shadow DOM
2066-
could turn off inertness.
2067-
I assume this is ok?
20682054
</div>
20692055

20702056

0 commit comments

Comments
 (0)