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

RE: -webkit-background-clip:text and -webkit-text-fill-color?

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 1 Jun 2012 04:51:56 +0000
To: Brian Manthos <brianman@microsoft.com>, Tab Atkins Jr. <jackalmage@gmail.com>, Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
CC: Jared Wein <jwein@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290A35A1CA@TK5EX14MBXC262.redmond.corp.microsoft.com>

[Brian Manthos:]
> 
> There's another use case that might be interesting as well.
> 
> Color can influence other *-color properties via currentColor.  As such,
> you can do things like...
> 	div {
> 		color: red;
> 		border-color: currentColor;
> 		box-shadow: 10px 10px 5px currentColor;
> 	}
> 
> There are times when it would be nice to have this as well:
> 	div {
> 		color: teal;
> 		border-color: currentColor;
> 		background-color: currentColor;
> 		text-color: blue;
> 	}
> 
> With the introduction of text-color (with an initial value of
> currentColor), properties names such as text-image naturally come to mind.
> 
> Foreground-color, text-color... something like that.
> 
That's a solution, not a use-case. I can't tell why I wouldn't rather do:

 	div {
 		color: blue;
 		border-color: teal;
 		background-color: teal;
	}

If the requirement is 'define the teal color once and use it multiple times' then 
that is addressed by CSS Variables.

Received on Friday, 1 June 2012 04:52:30 GMT

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