Re: [css-color] Have you considered standardizing a rgba(#RRGGBB, <alpha-value>) notation?

On May 10, 2013, at 10:11 AM, "Sam L'ecuyer" <sam@cateches.is> wrote:

> 
>> I don't get it. If you have to include the color inside the that you are going to modify, that is a considerable shortcoming. I'd much rather have it as this:
> 
>> color: #ff4500; color-adjust(saturation - 20%);
>> background-color: orangered; color-adjust(luminance 50%, background-color, box-shadow, border-color);
> 
> Should that be `color: #ff4500, color-adjust(saturation - 20%);`?  A ; doesn't make sense to me there.

No, the 'color' property would be declared normally, as would 'border-color' (or the shorthand), 'background-color'  (or the shorthand), 'text-shadow', 'box-shadow', etc. The semicolon separates declarations, as usual. 'color-adjust' would be a separate property, so I did mess up writing that. I should have written this:

.foo {
   color: #ff4500; 
   color-adjust: saturation - 20%;
}
.bar {
   background-color: orangered; 
   color-adjust: luminance 50%;
   background-color, box-shadow, border-color;
}

The list following the percentage in the second example would be the properties to apply the adjustment to (if omitted, would apply to all properties that use <color>). So the following two examples would be equivalent, aside from stacking context differences:

.foo {
   color-adjust: alpha 20%;
}
.foo {
   opacity: 0.2;
}

An alternative syntax would be to have an "all" keyword that could substitute for a list of properties, and have 'color' be the default property affected, if the list of properties or 'all' was omitted. 

Received on Friday, 10 May 2013 18:05:43 UTC