W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [css3-values] multiplying and dividing complex units in calc?

From: Chris Eppstein <chris@eppsteins.net>
Date: Thu, 8 Mar 2012 13:32:38 -0800
Message-ID: <CANyEp6Wh77=ET6K69e53H7Emya+S_iu9r4GK7R9PhTVXh0-Kqg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style@w3.org
It does seem that the property context would matter in terms of a default
value. But that context is available at evaluation time. If different
fallbacks needed at different points in the calculation, then calcs could
be nested.

Chris

On Thu, Mar 8, 2012 at 11:59 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Mar 8, 2012 at 11:38 AM, Chris Eppstein <chris@eppsteins.net>
> wrote:
> > Really doesn't seem that that big of a challenge. Provide a fallback
> value
> > as a second argument which would default to 0.
> >
> > width: calc(100px / (50% - 100px), 10px)
>
> It would obviously require some sort of fallback value, yes.  One of
> the issues is deciding what the best fallback value is.  '0' is
> simple, but not obviously the best, particularly if the property
> doesn't accept 0.
>
> ~TJ
>
Received on Thursday, 8 March 2012 21:33:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT