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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29200</bug_id>
          
          <creation_ts>2015-10-13 16:25:59 +0000</creation_ts>
          <short_desc>Specifying top and bottom margins in percentage should relate to height, not width, of parent</short_desc>
          <delta_ts>2015-10-24 16:29:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Box model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>teo8976</reporter>
          <assigned_to name="Bert Bos">bert</assigned_to>
          <cc>csstipper</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>123683</commentid>
    <comment_count>0</comment_count>
    <who name="">teo8976</who>
    <bug_when>2015-10-13 16:25:59 +0000</bug_when>
    <thetext>http://www.w3.org/TR/CSS21/box.html#value-def-margin-width

&gt; &lt;percentage&gt;
&gt; The percentage is calculated with respect to the
&gt; WIDTH of the generated box&apos;s containing block. Note that this
&gt; is true for &apos;MARGIN-TOP&apos; AND &apos;MARGIN-BOTTOM&apos; AS WELL.

This is completely demential. A vertical margin computed as a percentage of width. Somebody explain me what&apos;s the rationale behind that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123722</commentid>
    <comment_count>1</comment_count>
    <who name="francky">csstipper</who>
    <bug_when>2015-10-15 16:06:13 +0000</bug_when>
    <thetext>Well, I don&apos;t think it&apos;s a bug, nor &quot;completely demential&quot;. 
A summary about the rationale you can find on http://www.impressivewebs.com/vertical-percentages-css/#comment-40421.
More about the backgrounds in paragraph 3 (The specs: css2.1 and css3) and paragraph 4 (What I understand of it) of this test page: http://clba.nl/sitepoint/vertical-percentage-margins.htm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123893</commentid>
    <comment_count>2</comment_count>
    <who name="">teo8976</who>
    <bug_when>2015-10-24 16:29:50 +0000</bug_when>
    <thetext>At the very least a way must be provided to express percentages of height.
What is completely unacceptable is that a height (or vertical margin) cannot be expressed, in ANY way, as a percentage of a height.

Actually, this is only a tiny part of a huge problem in the whole CSS specification, that is that EVERYTHING vertical-related is a nightmare.
 
I understand that CSS (and the box model) was conceived with content flowing in a vertical page with a given width but indefinite height in mind, which is the most common scenario, but by 2015 (if not fifteen years ago already) we should have realized that it is not the *only* scenario.

Another example of it is how ridiculously difficult it is to simply center something vertically, actually impossible in a general and elegant way not involving horrible hacks and/or changing the markup and/or only working under given assumptions - where the horizontal counterpart is always trivial.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>