Re: [csswg-drafts] [css-text] Syntax for percentage-of-width-of-space for 'word-spacing' (#3232)

The calc() problem I'm talking about is that, in a calculation, plain numbers need to be scalars: if a property takes a length, it's always valid to multiply the length by a scalar (`5px * 3`), and never valid to add it to a scalar (`5px + 3`).  But if a number is a non-scalar value (a length), then this becomes impossible to adjudicate. If you start with a `word-spacing: 1.3` and decide you need it to be 1px wider, you can't write `word-spacing: calc(1.3 + 1px)`, because that fails to type-check, and there's no reasonable way around that. You *need* something to indicate that the non-scalar value is a non-scalar - a unit, a percentage sign, a function that we know evaluates to a non-scalar type like `<length>`.

So yeah, if you wanted to use that last option, then `word-spacing: calc(1px + scale-space(130%))` would work, it's just bit verbose.

(I personally think it's completely fine to have more single-use-case units, even or especially ones with longer names to indicate their special-purpose-ness. `word-spacing: calc(1px + 1.3spacewidth)` seems fine to me, and satisfies my objection from above.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3232#issuecomment-1029432900 using your GitHub account


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

Received on Thursday, 3 February 2022 21:47:57 UTC