Re: [csswg-drafts] [css-values] Computed value of a negative calc unit that doesn't allow negative lengths.

Okay, so there are two interpretations of what dbaron said:
  * That clamping happens at each stage (computed and used), if it is possible at that stage.
  * That clamping happens at the stage in which it's guaranteed to be possible.

For example, `font-size` can compute all of its values at computed value time (and indeed, must do so in order for ems to be able to compute elsewhere). It would clamp at computed value time; and clamping at used value time is unnecessary.

`width` however depends on layout information to resolve percentages, and therefore it cannot clamp values that mix percentages and lengths at computed value time. Therefore two behaviors are possible:
  * `width` clamps calc() expressions that do not mix lengths and percentages at computed value time, and clamps calc() expressions that do mix them at used value time
  * `width` only clamps calc() expressions at used value time.
  
The latter seems slightly simpler, but since it means that a property only clamps exactly one time, a property that currently only has computed-value units and then later adds used-value units would change behavior in an author-observable way.

The wording for each of these options would be different, so we need the WG to resolve on which one. 

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

Received on Wednesday, 21 June 2017 19:40:54 UTC