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

Re: [csswg-drafts] [css-media-queries] How do media queries with calc() where it can be resolved early serialize?

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Thu, 14 Dec 2017 05:13:37 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-351610982-1513228417-sysbot+gh@w3.org>
The resolution of https://github.com/w3c/csswg-drafts/issues/434, I think we should do the same here, and simplify (and clamp, if necessary) early.

However, there's one part of the resolution I don't understand, which was highlighted by @tabatkins in that discussion: we simplify and clamp early, but then we put a calc() around the result of the simplification.

If we apply the same logic to media queries, this means that
`@media (min-aspect-ratio: calc(3 - 2) / calc(5 - 4)) { }`
`@media (min-aspect-ratio: calc(1) / calc(1)) { }`
would serialize the same, but
  `@media (min-aspect-ratio: 1 / 1) { }`
would not.

I am not sure I follow why. @tabatkins can you explain?

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1968#issuecomment-351610982 using your GitHub account
Received on Thursday, 14 December 2017 05:13:40 UTC

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