Skip to content

Commit

Permalink
[css-values] Per WG resolution, added vi and vb units. For #113.
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins committed Jun 22, 2016
1 parent b20c4b7 commit 52468c9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css-values/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,10 @@ Relative lengths</h3>
<td>1% of viewport's width
<tr><td>''vh''
<td>1% of viewport's height
<tr><td>''vi''
<td>1% of viewport's size in the root element's <a>inline axis</a>
<tr><td>''vb''
<td>1% of viewport's size in the root element's <a>block axis</a>
<tr><td>''vmin''
<td>1% of viewport's smaller dimension
<tr><td>''vmax''
Expand Down Expand Up @@ -1018,6 +1022,16 @@ Viewport-percentage lengths: the ''vw'', ''vh'', ''vmin'', ''vmax'' units</h4>
<dd>
Equal to 1% of the height of the initial containing block.

<dt><dfn lt=vi>vi unit</dfn>
<dd>
Equal to 1% of the size of the initial containing block
in the direction of the root element's inline axis.

<dt><dfn lt=vb>vb unit</dfn>
<dd>
Equal to 1% of the size of the initial containing block
in the direction of the root element's block axis.

<dt><dfn id="vmin" lt="vmin">vmin unit</dfn>
<dd>
Equal to the smaller of ''vw'' or ''vh''.
Expand All @@ -1027,6 +1041,11 @@ Viewport-percentage lengths: the ''vw'', ''vh'', ''vmin'', ''vmax'' units</h4>
Equal to the larger of ''vw'' or ''vh''.
</dl>

Issue: All units need to be possible to evaluate in a context without any elements or styling;
for example, ''rem'' in a media query is evaluated
relative to the document's initial font size.
How do we get an inline/block direction from the document?

<!--
████████ ██ ██ ██ ████████ ████████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██
Expand Down Expand Up @@ -2242,6 +2261,7 @@ Changes</h2>
<li>Added definition of <<ident>> notation to definition of <a>identifiers</a>.
<li>Added <<length-percentage>> as a shorthand for <<length>> | <<percentage>>,
along with equivalent productions for angles, numbers, times, and frequencies.
<li>Added the ''vi'' and ''vb'' units.
<li>Various clarifications and editorial improvements.
</ul>

Expand Down

0 comments on commit 52468c9

Please sign in to comment.