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

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)) { }`
and 
`@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