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

Re: [css3-calc()] variable name for static value

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 2 Mar 2015 09:54:51 -0800
Message-ID: <CAAWBYDAUzF=zz8GqQC4Gn0f0j4KYs7RvpZieAdYiwjJtTHs3Kg@mail.gmail.com>
To: Vikas Yadav <vayrsr@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Mon, Mar 2, 2015 at 1:32 AM, Vikas Yadav <vayrsr@gmail.com> wrote:
> Css style:
> Div{width:calc(100%-20px);}
> But problem arise here when we use number of tag with calc(). I will change the parent width it automatically adjust but when use a static value in place of percentage. Change every where. Where use calc() method but you forget in one place that will be no affect here but layout will be affected so much. You find the problem and correct it but another alter native solution to defined variable with value. Use variable name to place value so change in one place and affect in all place.I will recommend of that because website layout is relative and no need to defined static height and width

Already addressed by <http://dev.w3.org/csswg/css-variables/>; Firefox
and WebKit have implemented it, Chrome intends to soon.

Received on Monday, 2 March 2015 17:55:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:52 UTC