[css3-values] syntax of attr()

Currently the syntax of attr() is
   attr(<ident>, <type>, <fallback>)
   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
   attr(<ident> as <type>, <fallback>)
   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.



Received on Thursday, 15 September 2011 23:08:27 UTC