Bug 187718

Summary: [css-counters][css-display-contents] "display: contents" breaks counter incrementing???
Product: WebKit Reporter: jonjohnjohnson <hi>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Critical CC: bfulgham, kyle.bavender, simon.fraser, zalan
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description jonjohnjohnson 2018-07-16 17:46:34 PDT
CSS counters break, at least do not increment, when using "display: contents" on the elements ancestor within the "counter-reset" container.

testcase -> http://jsfiddle.net/5rcjk9gv/3/

Test case is straightforward, the first box does not use display: contents, the second box uses it on ancestors of the items that want access to the incremented counter value, but it's broken :(

This isn't broken in chrome or firefox.
Comment 1 jonjohnjohnson 2018-07-16 17:52:34 PDT
Sorry testcase url is -> http://jsfiddle.net/5rcjk9gv/4/
Comment 2 jonjohnjohnson 2018-07-17 17:07:42 PDT
Pertinent (open) issue in csswg drafts relating to display box generation and counter interactions, though not exactly about the bug here in safari... https://github.com/w3c/csswg-drafts/issues/674
Comment 3 Kyle Bavender 2020-01-27 06:23:51 PST
Confirmed this is still an issue with Safari as of 13.0.4. Does not match either Chrome or Firefox's behavior.