<?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>147953</bug_id>
          
          <creation_ts>2015-08-12 14:09:47 -0700</creation_ts>
          <short_desc>Percentage padding of absolutely positioned element being calculated based on parent&apos;s content width instead of containing block.</short_desc>
          <delta_ts>2022-06-11 07:29:13 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</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>1</everconfirmed>
          <reporter name="Keith Grant">keithjgrant</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1117064</commentid>
    <comment_count>0</comment_count>
    <who name="Keith Grant">keithjgrant</who>
    <bug_when>2015-08-12 14:09:47 -0700</bug_when>
    <thetext>Create a relatively-positioned container that has left/right padding. Inside that, create an absolutely-positioned element with left: 0 and right: 0, so its width equals the width of the container. Give the absolutely-positioned element a percentage based left and/or right padding, and that padding will be calculated based on the width of the container&apos;s content, rather than the width of the containing block.

I&apos;ve recreated the bug here: http://codepen.io/keithjgrant/pen/LVvbYZ

The spec states the percentage is calculated with respect to the width of the containing block (http://www.w3.org/TR/css3-box/#the-padding). The containing block should be determined by the padding edge of the ancestor (http://www.w3.org/TR/css3-box/#the-padding).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875349</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-06-10 17:36:05 -0700</bug_when>
    <thetext>All browser match each other in the &quot;codepen&quot; test case. Tested using Safari 15.5 on macOS 12.4, Chrome Canary 104 and Firefox Nightly 103. Thanks!

I think this got fixed along the lines and it can be marked as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>