Re: Extended shorthand for hex colours

22.01.2015, 16:50, "Ryan Williams" <email@ryanwilliams.co.uk>:
> Hexadecimal notation is commonly used for defining colours in CSS, but the shorthand is lacking.šRight now we can use #CCC which would be expanded to #CCCCCC, but that's pretty much it.
>
> Wouldn't it be nice if we built upon the principles of the existing shorthand -- repeating the defined characters -- to provide more options?
>
> For example:
>
> 1. #Cšexpands to #CCCCCC
> 2. #C3šexpands toš#C3C3C3
> 3. #CCC expands toš#CCCCCC
>
> These two extra shorthand formats would allow a lot of hex colours to be typed and/or transmitted across networks more efficiently.
>
> I don't think it'd make sense to allow for four- or five-character shorthand, as the defined characters could not be repeated in full.

Has already been proposed:

https://lists.w3.org/Archives/Public/www-style/2011Aug/0037.html

Received on Thursday, 22 January 2015 14:39:59 UTC