You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-values-4/Overview.bs
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2234,14 +2234,21 @@ The Large, Small, and Dynamic Viewport Sizes</h5>
2234
2234
and therefore have no effect on any of the [=viewport-percentage lengths=].
2235
2235
(Typically on-screen keyboards will fit into this category.)
2236
2236
2237
-
In all cases, scrollbars are assumed not to exist.
2238
-
<span class='note'>Note however that the [=initial containing block=]'s size
2239
-
<em>is</em> affected by the presence of scrollbars on the viewport.</span>
2240
-
2241
-
ISSUE: <a href="https://www.w3.org/TR/css-values-3/#viewport-relative-lengths">Level 3 assumes scrollbars never exist</a> because it was hard to implement
2242
-
and only Firefox bothered to do so.
2243
-
This is <a href="https://github.com/w3c/csswg-drafts/issues/1766#issuecomment-460470368">making authors unhappy</a>.
2244
-
Can we improve here?
2237
+
In all cases,
2238
+
if the value of 'overflow' or 'scrollbar-gutter' on the [=root element=] in either axis
2239
+
would cause scrollbars to appear (or space to be reserved for them) unconditionally
2240
+
(for example, ''overflow: scroll'', but not ''overflow: auto''),
2241
+
the [=computed values=] of the [=viewport-percentage lengths=] in that axis
2242
+
are reduced in accordance with the [=initial containing block=].
2243
+
Otherwise,
2244
+
and always in the case of [=media queries=],
2245
+
the [=viewport-percentage lengths=] are sized
2246
+
assuming that scrollbars do not exist
2247
+
(even if this diverges from the [=initial containing block=]).
2248
+
2249
+
Note: The value of 'overflow' on [=the body element=]
2250
+
can sometimes affect the presence of scrollbars on the [=root element=].
2251
+
This <em>does not</em> affect the size of viewport units, however.
0 commit comments