Re: [css3-values] proposal for handling division and units in calc() [ACTION-205]

Also sprach L. David Baron:

 > How about replacing this portion of the above paragraph:
 >   The context of the expression imposes a target type, which is one
 >   of length, frequency, angle, time, or number. Any PERCENTAGE token
 >   in the expression has the target type. The NUMBER tokens are of
 >   type number, and the DIMENSION tokens have types of their units
 >   (‘cm’ is length, ‘deg’ is angle etc.).
 > with:
 >   The context of the expression imposes a target type, which is one
 >   of length, frequency, angle, time, or number.  NUMBER tokens are
 >   of type number.  DIMENSION tokens have types of their units (‘cm’
 >   is length, ‘deg’ is angle etc.); any DIMENSION whose type does not
 >   match the target type is not allowed and must be a parse error.
 >   If percentages are accepted in that context and convertible to the
 >   target type, a PERCENTAGE token in the expression has the target
 >   type; otherwise percentages are not allowed and must be a parse
 >   error.
 > 
 > And then adding, below, the following two paragraphs:
 > 
 >   The value resulting from an expression must be clamped to the
 >   range allowed in the target context.  For example, 'width:
 >   calc(5px - 10px)' is equivalent to 'width: 0px' since widths
 >   smaller than 0px are not allowed.
 > 
 >   Note: Except for range restrictions, all values allowed inside an
 >   expression are either numbers or values that are permitted in the
 >   context of the expression.

Thanks. I edited the text based on your proposal.

  http://dev.w3.org/csswg/css3-values/#the-calc-min-and-max-functions

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Tuesday, 10 August 2010 07:15:54 UTC