This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29510 - Containing block for sticky positioning should skip anonymous containing blocks.
Summary: Containing block for sticky positioning should skip anonymous containing blocks.
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Positioned Layout (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 00:34 UTC by Robert Flack
Modified: 2016-03-02 01:22 UTC (History)
1 user (show)

See Also:


Attachments

Description Robert Flack 2016-03-02 00:34:56 UTC
https://www.w3.org/TR/css3-positioning/#sticky-pos states that the sticky-constraint rectangle is computed based on the containing block of the sticky positioned element, however, since a sticky position element can be inline the containing block can be an anonymous block. I believe constraining to the anonymous block would be unintuitive to a site author as it doesn't correspond to an actual element on their site. 

Firefox and safari's sticky implementations both seem to skip anonymous containing blocks when computing the sticky constraining rectangle as can be seen on http://flackr.github.io/compositor-worker/sticky/sticky.html. I think the spec should clarify that anonymous containing blocks are skipped.
Comment 1 L. David Baron (Mozilla) 2016-03-02 01:22:56 UTC
Should such anonymous boxes count as containing blocks at all?  It's not clear to me that they should; it might be worth testing the other things that should depend on whether they count as containing blocks.  (The spec specifically excludes percentages in the last paragraph of https://drafts.csswg.org/css2/visuren.html#anonymous-block-level , but it's not clear to me why it excludes only those and not other things.)