<?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>23570</bug_id>
          
          <creation_ts>2009-01-27 07:52:31 -0800</creation_ts>
          <short_desc>Percentage for &apos;top&apos;/&apos;bottom&apos; on relatively positioned elements</short_desc>
          <delta_ts>2022-07-22 14:48:39 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>0</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>hyatt</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107186</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2009-01-27 07:52:31 -0800</bug_when>
    <thetext>[[
Yes, it ignores percentage values for top and bottom (with relative positioning) when the parent is a percentage height (or height auto). 

It even fails if there is an ancestor with a fixed pixel height but the next child is set at height:100% then it still fails even though the percentage height should resolve to a known dimension.

Code:
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.test {
    height:200px;
    background:red;
    top:300px;
    position:relative
}
p {
    position:relative;
    top:-50%;
    border:1px solid green;
}
.test div {
    height:100%;
    background:blue;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;test&quot;&gt;
    &lt;div&gt;
        &lt;p&gt;test&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
If you remove the nested div it will suddenly work.

(This is Safari3 on the PC but I assume mac versions would be the same.)
]] -- Paul O&apos;B on sitepoint forums</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886000</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-22 10:01:09 -0700</bug_when>
    <thetext>I changed the test case from Description / Comment 0 and changed it into following JSFiddle:

Link - https://jsfiddle.net/zgv6mnch/1/show

In the above, Safari 15.6 on macOS 12.5 matches with other browsers (Chrome Canary 105 and Firefox Nightly 104). Since all browsers are rendering the page same, I am not sure whether there is something else to be done (except if I understood this bug wrong - then please ignore me). I think this can be closed as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>