Allow specify numbers with suffixes
Tab Atkins Jr.
jackalmage at gmail.com
Wed Dec 13 21:05:24 UTC 2017
On Tue, Dec 12, 2017 at 6:38 PM, Darien Valentine <valentinium at gmail.com> wrote:
> The runtime version seems likely to create more confusion than not, too. The
> example you gave — `10px + 1em` — demonstrates how that might go. One might
> expect that to work because css’s `calc` can do it. But the browser knows
> what the current value of `em` for the node in question is. Even if it
> somehow knew what the contextual relationship between px and em was, it’s
> not clear to me what that’s actually supposed to evaluate to.
Right. It turns out that we have an answer to that now!
(drafts.css-houdini.org/css-typed-om) But any solution that didn't
allow us to write that sort of thing and get a CSSNumericValue out of
it would be pretty incomplete.
More information about the es-discuss