w3c / w3c/csswg-drafts

[css-values-4] Should we ignore the scrollbars/etc when using vw/etc units on the root?

Open
#9,653 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-values-4
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

In #6026, we just resolved to subtract scrollbars from viewport units when overflow:scroll is specified on the root (or similar things, like scrollbar-gutter:always).

For obvious reasons, we do not do this adjustment when v* units are used in MQs; it's trivially cyclic. @emilio asked in IRC if we need to similarly ignore these adjustments for v* units used on the root, similarly to how we treat em and other "look at the parent for some information" units.

It wasn't immediately clear to us on the call if there's actually a potential cyclic issue here or not, so this issue is to figure out if there is.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read issue #6026 and the CSS Values 4 discussion about viewport units, root styles, and media queries first. Determine whether scrollbar adjustments for viewport units on the root can create a cycle, then document the resulting specification clarification or change needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.