Skip to content

Commit a64cdba

Browse files
committed
Nope, it's not inherited, it just kinda-sorta acts like it in some cases.
1 parent 2297f0e commit a64cdba

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

css-scroll-anchoring/Overview.bs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,32 +228,36 @@ or exclude portions of the DOM from the anchor node selection algorithm.
228228
Name: overflow-anchor
229229
Value: auto | none
230230
Initial: auto
231-
Inherited: yes
231+
Inherited: no
232232
</pre>
233233

234234
Values are defined as follows:
235235

236236
<dl dfn-type=value dfn-for=overflow-anchor>
237237
: <dfn>auto</dfn>
238238
::
239-
Declares that the DOM subtree rooted at the element
240-
is eligible to participate in the <a>anchor node selection algorithm</a>
239+
Declares that the element
240+
is potentially eligible to participate in the <a>anchor node selection algorithm</a>
241241
for any scrolling box created by the element or an ancestor.
242+
242243
: <dfn>none</dfn>
243244
::
244-
Declares that the DOM subtree rooted at E
245-
is <em>not</em> eligible to participate in the <a>anchor node selection algorithm</a>
245+
Declares that the element and its descendants
246+
(that aren't nested inside of another scrolling element)
247+
are <em>not</em> eligible to participate in the <a>anchor node selection algorithm</a>
246248
for any scrolling box created by the element or an ancestor.
247249
</dl>
248250

251+
Note: It is not possible to turn scroll anchoring "back on"
252+
for descendants of a ''scroll-anchoring: none'' element.
253+
However, descendant <a>scroll containers</a> automatically "turn it back on"
254+
(for their own scrolling box)
255+
unless they explicitly have ''scroll-anchoring: none'' set on them as well.
256+
249257
Note: The <code>overflow-anchor</code> property was also proposed (with different values)
250258
for <a href="http://tabatkins.github.io/specs/css-sticky-scrollbars/">CSS Sticky Scrollbars</a>,
251259
which has now been <a href="https://tabatkins.github.io/specs/css-sticky-scrollbars/#intro">superseded</a>.
252260

253-
Issue: The spec originally said that 'overflow-anchor' isn't inherited,
254-
but, uh, I don't know how that works,
255-
given that the values are defined as affecting their descendants.
256-
257261
<h2 id='priv-sec'>
258262
Privacy and Security Considerations</h2>
259263

0 commit comments

Comments
 (0)