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

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

From: Darryl Pogue via GitHub <sysbot+gh@w3.org>
Date: Wed, 20 Sep 2017 14:24:33 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-330867839-1505917462-sysbot+gh@w3.org>
> Why the constant can't be used in calc? This does not meet expectations.

The constants **do** work in `calc()`, at least in my testing in Safari on the iPhone X simulator.

```
header {
  height: calc(44px + constant(safe-area-inset-top));
}
```

They also work in gradients:
```
linear-gradient(to bottom, black 0%, black constant(safe-area-inset-top), grey constant(safe-area-inset-top), grey 100%);
```

-- 
GitHub Notification of comment by dpogue
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1693#issuecomment-330867839 using your GitHub account
Received on Wednesday, 20 September 2017 14:24:27 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:43 UTC