<?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>26480</bug_id>
          
          <creation_ts>2014-07-31 13:04:35 +0000</creation_ts>
          <short_desc>Author style max-width/height can interfere with style</short_desc>
          <delta_ts>2014-08-01 07:24:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Fullscreen</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>cpearce</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>roc</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>109643</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-07-31 13:04:35 +0000</bug_when>
    <thetext>http://fullscreen.spec.whatwg.org/#user-agent-level-style-sheet-defaults

&lt;!DOCTYPE html&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
&lt;style&gt;
body {
  background: pink;
  margin: 0;
}
iframe {
  border: 0;
  height: 270px;
  max-height: 50%;
  width: 100%;
}
&lt;/style&gt;
&lt;iframe src=&quot;//www.youtube.com/embed/pg5iRruqcps&quot;&gt;&lt;/iframe&gt;

This is a minimized version of http://m.vk.com/video10345392_166569492

The author style sheet says max-height: 50% and since the user agent style sheet doesn&apos;t say differently, in fullscreen the iframe fails to fill the viewport.

Unless there&apos;s some case where this makes sense, min-width, min-height, max-width and max-height should all be 100% in the UA style sheet.

It fixes the problem in the wild, at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109648</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-07-31 13:09:41 +0000</bug_when>
    <thetext>roc, WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109653</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-07-31 13:33:03 +0000</bug_when>
    <thetext>The Gecko styles for *|*:not(:root):-moz-full-screen are:

  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2147483647 !important;
  background: black;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: none !important;
  box-sizing: border-box !important;

which I suspects answers your question about what roc thinks, but also note the box-sizing and z-index bits....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109725</commentid>
    <comment_count>3</comment_count>
    <who name="Robert O&apos;Callahan (Mozilla)">roc</who>
    <bug_when>2014-07-31 23:41:21 +0000</bug_when>
    <thetext>z-index is only an artifact of the way we implement fullscreen. If we implemented it the way the spec says, with a magic extra always-on-top layer, we wouldn&apos;t need it. So I don&apos;t think that needs to be required in the UA sheet.

box-sizing:border-box does need to be in the UA sheet though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109730</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-01 04:26:20 +0000</bug_when>
    <thetext>The specification has box-sizing. We don&apos;t have anything as !important though. Wouldn&apos;t we want to let developers override these things?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109731</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-01 04:26:58 +0000</bug_when>
    <thetext>Also, does the CSS specification even allow !important for user agent style sheets?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109735</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-08-01 06:55:06 +0000</bug_when>
    <thetext>Blink also has !important sprinkled all over its fullscreen.css UA style sheet, FWIW.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109737</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-01 07:10:23 +0000</bug_when>
    <thetext>It seems per http://dev.w3.org/csswg/css-cascade/ user agent style sheets can do this. Okay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109739</commentid>
    <comment_count>8</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-01 07:24:35 +0000</bug_when>
    <thetext>https://github.com/whatwg/fullscreen/commit/134cdeb6d6d3f7c3bdb3c9df754185c24a59353f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>