w3c / w3c/csswg-drafts

[cssom-view] The definitions of innerWidth and innerHeight are ambiguous

Open
#9,065 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cssom-view-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Link to section: https://drafts.csswg.org/cssom-view/#dom-window-innerwidth

The innerWidth attribute must return the viewport width including the size of a rendered scroll bar (if any), or zero if there is no viewport.

The word including is ambiguous and can mean

  • which includes
  • as well as, plus

So the quoted definition can be interpreted in two ways:

  1. innerWidth = viewport width, which includes the size of the scrollbar
  2. innerWidth = viewport width + size of scrollbar (viewport width does not include the size of the scrollbar)

Which one is it? And consider replacing including with a clearer word.

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

Start with the CSSOM View specification section linked in the issue, especially the definitions of Window.innerWidth and Window.innerHeight. Confirm the intended treatment of rendered scrollbars with the CSS Working Group, then update the wording so the interpretation is unambiguous and verify the resulting Bikeshed specification output.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.