W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2017

Re: [csswg-drafts] [css-variables] User Agent properties and variables

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 Sep 2017 23:07:29 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-329322067-1505344039-sysbot+gh@w3.org>
> Now that the iPhone X has been announced, the suggestion to add safe-area-insets is more clear. The idea is that a page needs to know how to avoid the rounded corners and notch at the top or side of the screen (depending on orientation).

This has obvious parallels to the Round Display stuff; we should make sure these work in compatible ways.  But like @FremyCompany said, this is a different issue and the specifics should be discussed in a different thread.

> The name: whether to use constant(name), var(name-without-leading-hyphen) or var(user name). I'd prefer constant because it makes it more clear that there is no way for the developer to set these properties.

I also strongly prefer `constant()`.  (I discussed in the meeting how this ties into the desire for cheaper "global variables", so authors could use `constant(--name)` while UA-defined ones are just `constant(name)`)

> A JS hook so that they can be easily queried and raise notifications on change.

:+1: This is easy API-wise - just hang a maplike off of `CSS`, and make it an event emitter.

> A place to define the new properties/values. Maybe these just end up in the respective specifications clearly labelled as read-only.

I'd prefer we make a new spec for this that's intended to be where most of them sit.  Like Selectors is for selectors - most of them live there, but a few do live in other specs.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1693#issuecomment-329322067 using your GitHub account
Received on Wednesday, 13 September 2017 23:07:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:18 UTC