Bug 190580 - display:unset does not stop an element from creating a new formatting context for sticky children.
Summary: display:unset does not stop an element from creating a new formatting context...
Status: RESOLVED DUPLICATE of bug 224415
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-15 08:21 PDT by Dan Peddle
Modified: 2021-08-25 03:55 PDT (History)
6 users (show)

See Also:


Attachments
testcase (992 bytes, text/html)
2018-10-15 08:21 PDT, Dan Peddle
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Peddle 2018-10-15 08:21:26 PDT
Created attachment 352321 [details]
testcase

The `display: unset` rule should stop any element where it is applied from creating a new containing block.

This bug was found by nesting a position sticky inside a plain div with a single `display:unset` rule.

Expected behaviour - the sticky element should take its containing block from body (being the closest block formatting context)

Actual behaviour - The sticky element takes its containing block from the parent div

Steps to reproduce: scroll down and observe that sticky element does not stick. 

Works as expected in most recent Firefox and Chrome.
Comment 1 Dan Peddle 2018-10-17 10:54:16 PDT
I've played a bit more, and `display: unset` works as expected for other child elements - seems like `position: -webkit-sticky` is the only thing that's misbehaving.
Comment 2 Radar WebKit Bug Importer 2018-10-17 11:22:30 PDT
<rdar://problem/45344773>
Comment 3 Dan Peddle 2021-05-09 14:11:36 PDT
Still present in Safari 14, description updated.
Comment 4 Martin Robinson 2021-08-25 03:55:36 PDT
This should be fixed now.

*** This bug has been marked as a duplicate of bug 224415 ***