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

Re: [css3-values] nesting calc()

From: Pete Boere <pete@the-echoplex.net>
Date: Tue, 26 Jun 2012 21:50:25 +0100
Message-ID: <CAKZZz6cmWDFM30NTG2xJuTSpTyO+7wz9FOx-u0tKLtbnoxOD2g@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Fran├žois REMY <fremycompany_pub@yahoo.fr>, fantasai <fantasai.lists@inkedblade.net>, WWW Style <www-style@w3.org>
css crush preprocessor uses bare parens as the math function [1]. The basic
idea is the same, though obviously a simpler proposition than calc as it
strips units and works with raw numbers rather than computed values.

Personally I quite like the bare parens syntax, especially if you add in
signing:

top: 50%;
height: 10em;
margin-top: -( 10em / 2 );

versus

top: 50%;
height: 10em;
margin-top: calc( ( 10em / 2 ) * -1  )




[1] http://the-echoplex.net/csscrush/#functions


-- 
Pete Boere
Web Developer
Received on Tuesday, 26 June 2012 20:50:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT