Repository navigation
Commit a366c3b
fix(lint): the negative-z warning described a renderer defect that is CSS painting order
Corrects this rule's own premise. Behaviour unchanged: wording and comment only.
The rule described a renderer defect. It is not one. Measured at 0.8.72:
z-index:-1, opaque ancestor background above it ABSENT (zero coverage)
z-index:-1, NO opaque background above it PRESENT (full coverage)
same element with z-index deleted entirely PRESENT (full coverage)
The element is painted in every case. Remove what is opaque above it and it
appears; the sign of z-index only moves it in the stacking order. A negative-z
descendant paints at step 2 of its nearest stacking context -- above that
context root's own background, below the context's positioned in-flow content
-- so a `position: relative` composition root carrying an opaque background
paints over it. Ordinary CSS painting order, and it also explains why any
stacking-context ancestor (isolation, transform, opacity<1, filter,
contain:paint, will-change; all six measured PRESENT) makes it visible: the
child then paints inside that ancestor's context, which itself paints above the
root's background.
So #4366's "does not render" is occlusion, not a drop, and the previous comment
-- "whether negative stacking is in scope for the renderer is a design decision"
-- was wrong: the renderer has no say in it.
The rule stays, because authors do hit this and nothing explains it: the element
is in the DOM, laid out, and invisible. What changes is that the message now
names the CAUSE and the remedy instead of implying the tool failed. Two
assertions pin that it cannot drift back, and the mutation goes red on exactly
the four message checks.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent f35c9d5 commit a366c3b
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2221 | 2221 | | |
2222 | 2222 | | |
2223 | 2223 | | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
2224 | 2227 | | |
| 2228 | + | |
2225 | 2229 | | |
2226 | 2230 | | |
2227 | 2231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
302 | | - | |
| 301 | + | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | | - | |
710 | | - | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
711 | 722 | | |
712 | 723 | | |
713 | 724 | | |
| |||
0 commit comments