W3C home > Mailing lists > Public > www-style@w3.org > September 2011

Re: [css3-values] syntax of attr()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 15 Sep 2011 16:24:09 -0700
Message-ID: <CAAWBYDC-QqFHeLhyAZxMRPXFRkKB5Ks65eUpuTigfFrWMs1wjg@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Sep 15, 2011 at 4:07 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Currently the syntax of attr() is
>  attr(<ident>, <type>, <fallback>)
> e.g.
>  attr(bgcolor, color, black)
>
> I get rather confused with positional syntaxes, because I can never remember
> which
> argument goes first, second, etc. So I've been pondering alternatives and
> came up
> with
>  attr(<ident> as <type>, <fallback>)
> e.g.
>  attr(bgcolor as color, black)
>
> which makes it less positional -- the type is more closely tied to the
> attribute
> name than to the fallback, and then the comma behaves to separate
> alternatives
> like it does in font-family.

+1 to more intuitive function syntaxes with less commas.

~TJ
Received on Thursday, 15 September 2011 23:24:57 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:04 UTC