<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>168725</bug_id>
          
          <creation_ts>2017-02-22 07:51:56 -0800</creation_ts>
          <short_desc>position: sticky shouldn&apos;t create a stacking context</short_desc>
          <delta_ts>2024-06-26 05:34:09 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>Safari 9</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Flack">flackr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cigitia</cc>
    
    <cc>eelco</cc>
    
    <cc>emilio</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1279887</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Flack">flackr</who>
    <bug_when>2017-02-22 07:51:56 -0800</bug_when>
    <thetext>As far as I can tell from reading https://drafts.csswg.org/css2/visuren.html#z-index only position fixed implicitly creates a stacking context.

Loading http://output.jsbin.com/yucorey shows an example page which demonstrates that currently sticky is creating a stacking context (i.e. the z-index 2 descendant is stacked below the z-index 1 sibling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279892</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-02-22 08:34:35 -0800</bug_when>
    <thetext>I think it&apos;s better to match position:fixed here, since sticky has fixed-like behavior part of the time.

https://drafts.csswg.org/css-position-3/#position-property needs to be updated to say this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279894</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-02-22 08:36:52 -0800</bug_when>
    <thetext>https://github.com/w3c/csswg-drafts/issues/1053</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1883849</commentid>
    <comment_count>3</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2022-07-14 15:16:24 -0700</bug_when>
    <thetext>@smfr: Did safari regress something here?

  data:text/html,&lt;meta charset=utf8&gt;&lt;h1 style=&quot;position: sticky; top: 0;background-color:tomato; text-align: center;&quot;&gt;Hello&lt;/h1&gt;&lt;main style=&quot;height: 200vh;&quot;&gt;&lt;button&gt;Plain, under&lt;/button&gt;&lt;button style=&quot;opacity: 0.6;&quot;&gt;Translucid, overlaps&lt;/button&gt;&lt;/main&gt;

Seems to not behave the same as:

  data:text/html,&lt;meta charset=utf8&gt;&lt;h1 style=&quot;position: fixed; width: 100% top: 0;background-color:tomato; text-align: center;&quot;&gt;Hello&lt;/h1&gt;&lt;main style=&quot;height: 200vh;&quot;&gt;&lt;button&gt;Plain, under&lt;/button&gt;&lt;button style=&quot;opacity: 0.6;&quot;&gt;Translucid, overlaps&lt;/button&gt;&lt;/main&gt;

in Safari, but it does in Gecko and Blink.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1883944</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-14 18:56:32 -0700</bug_when>
    <thetext>Looks like we have an overlap-testing bug where &quot;Translucid&quot; fails to z-order on top o the sticky if you scroll (it gets fixed if you resize the window when it&apos;s on top).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>