[csswg-drafts] [css-values-5] Does serializing calc-size() ever change the number of arguments? (#10259)

dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-5] Does serializing calc-size() ever change the number of arguments? ==
The [definition of `calc-size()`](https://drafts.csswg.org/css-values-5/#calc-size) doesn't mention serialization at all, and I think it probably should.  In particular, the question I have about serialization is whether the number of arguments to `calc-size()` should ever change during a parse-serialize cycle.  I think there are three options:

1. Rerialize to the one-argument form whenever possible, otherwise serialize to the two-argument form.  This has the downside that the two-argument form is often clearer, I think.
2. Remember the number of arguments given and serialize in the form given.
3. Always serialize to the two-argument form.

Based on what `calc-size()` does I don't especially like option 1.  General principles of CSS serialization probably don't like 3, since shorter forms are generally preferred.  And since this question applies to both specified and computed values (though the answer *could* be different for the two), and option 2 is pretty strange for computed values, I also don't particularly like option 2.

cc @tabatkins 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10259 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 26 April 2024 20:57:18 UTC