- From: Matt Rakow <marakow@microsoft.com>
- Date: Wed, 23 Apr 2014 19:04:58 +0000
- To: Zack Weinberg <zackw@panix.com>, www-style list <www-style@w3.org>
> -----Original Message----- > From: Zack Weinberg [mailto:zackw@panix.com] > Sent: Thursday, April 10, 2014 6:24 PM > To: www-style list > Subject: Re: [css-values] Concrete proposal for unit algebra in calc() > > On 04/10/2014 06:41 PM, Simon Sapin wrote: > > On 10/04/2014 20:43, Zack Weinberg wrote: > [...] > >> 4. If the left side is a <number> or <integer> and the right side > >> is a <length>, resolve to <resolution>. > >> 5. If the left side is a <number> or <integer> and the right side > >> is a <time>, resolve to <frequency>. > > > > If we have those last two, should we also have these? > > > > (<number> or <integer>) / <resolution> = <length> (<number> or > > <integer>) / <frequency> = <time> > > Probably; I just missed those possibilities. I'm not sure how necessary the > special cases for the 1/x units are, though. > The resolution ones aren't quite right. The units for resolution are <physical pixels>/<CSS length>, not 1/<CSS length>. For example: <physical pixels> / <CSS inches> -> dpi <physical pixels> / <CSS pixels> -> dppx So the proposed combinations should actually result in: <length> * <resolution> -> <physical pixels> <number> / <length> -> <length^-1> <number> / <resolution> -> <length> / <physical pixels> Since we don't have units that equate to "physical pixels", "inverse length", or "length per physical pixel" I'd prefer to exclude these from the list until we have a well defined unit we can calc to. Thanks, -Matt
Received on Wednesday, 23 April 2014 19:05:31 UTC