Re: [csswg-drafts] [css-values] Use of 100vw is causing pointless horizontal scrollbars on some websites (#6026)

Why can a custom property registered with @property save "page width"?
When I tried with "100%", it did not work.
```css
@property --page-width {
  syntax: '<length-percentage>';
  inherits: true;
  initial-value: 0px;
}

body {
  --page-width:100%;
}

p {
  width: var(--page-width); /*Width of parent element, not page width*/
}

```
Demo: https://codepen.io/mikiprogram/pen/QWzzvMR

Is there a statement on this in the following W3C page?
URL: https://www.w3.org/TR/css-properties-values-api-1/
I would be glad to know!

-- 
GitHub Notification of comment by yuito-git
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6026#issuecomment-1752576960 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 9 October 2023 08:45:40 UTC