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

The spec is now clear that math functions are simplified immediately at parse time as much as possible, then again at computed/used value time (which isn't relevant for MQs).

Since MQs can convert all units to their canonical one, this means that all math functions in MQs should be resolvable immediately upon parsing.

Serialization is clear that fully-collapsed calc()s only serialize as their argument (without the `calc()` wrapper) if you're serializing a computed-time or later value. MQs are not computed or later, so they should never remove their calc() wrapper.

Note that, as currently specified, non-calc() math functions do not disappear if they're top-level even if they can be fully resolved; they retain their identify as the specific function and simplify their arguments. So a `sin(.5)` will serialize as such, not as `.479...`.

Since this should all be answered in the spec, I'm closing this issue. Feel free to reopen if there are any issues or confusing bits.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Thursday, 3 October 2019 23:39:58 UTC