<?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>267085</bug_id>
          
          <creation_ts>2024-01-04 08:50:48 -0800</creation_ts>
          <short_desc>overflow: hidden prevents CSS Subgrid</short_desc>
          <delta_ts>2024-02-07 15:14:15 -0800</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 17</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/44050</see_also>
          <bug_file_loc>https://codesandbox.io/p/sandbox/zen-rhodes-mbse3s?file=%2FApp.svelte</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darius Cepulis">darius</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>jaffathecake</cc>
    
    <cc>karlcow</cc>
    
    <cc>sgill26</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2002969</commentid>
    <comment_count>0</comment_count>
    <who name="Darius Cepulis">darius</who>
    <bug_when>2024-01-04 08:50:48 -0800</bug_when>
    <thetext>Applying `overflow: hidden` to an element that also has `display: grid; grid-template-rows: subgrid` will result in the element acting as though it doesn&apos;t have subgrid applied... unlike in Firefox and Chrome where subgrid behaves as expected.

Reproduced here: https://codesandbox.io/p/sandbox/zen-rhodes-mbse3s?file=%2FApp.svelte

Marked this as Safari 17, but I&apos;ve confirmed that it exists in Technology Preview (Release 185 (Safari 17.4, WebKit 19618.1.9.8)) too. 

Marked this as macOS 14 but I&apos;ve observed this on macOS 13, iOS/iPadOS 16, and iOS/iPadOS 17 as well. 

...

Cards with rounded corners and overflow hidden are a [big element of our design on mux.com](https://share.cleanshot.com/pJD9nrFX), so I&apos;ve been dying to use subgrid for a while. Unfortunately, this bug is preventing me from rolling it out, even behind a @supports flag, since I know it&apos;ll layout incorrectly on Safari.

Let me know if there&apos;s more I can provide! Y&apos;all are the best. Thanks for making the best browser engine ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2004450</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-01-11 08:51:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/120848131&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005440</commentid>
    <comment_count>2</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2024-01-16 16:17:58 -0800</bug_when>
    <thetext>I think the issue is that RenderElement::establishesIndependentFormattingContext() returns true if hasPotentiallyScrollableOverflow() returns true, but we also need to make sure that the box is a block box before we do that. 

The spec says: If the computed value of overflow on a block box is neither visible nor clip nor a combination thereof, it establishes an independent formatting context for its contents.

https://drafts.csswg.org/css-overflow-3/#overflow-control</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005464</commentid>
    <comment_count>3</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2024-01-16 18:04:33 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/22845</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005608</commentid>
    <comment_count>4</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2024-01-17 09:52:25 -0800</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/44050</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005625</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-17 11:08:31 -0800</bug_when>
    <thetext>Committed 273134@main (78a954e5a2bd): &lt;https://commits.webkit.org/273134@main&gt;

Reviewed commits have been landed. Closing PR #22845 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011559</commentid>
    <comment_count>6</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2024-02-07 15:14:15 -0800</bug_when>
    <thetext>*** Bug 268539 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>