Re: [css3-images] exactly 2 adjacent colors stops

On Mon, May 16, 2011 at 6:11 PM, Alan Gresley <alan@css-class.com> wrote:
> FYI, The code *-gradient(red 10px, blue 10px) when used with
> repeating-linear-gradient can be abused to create solid uniform color
> (opaque ~ transparent) shapes. Currently IE10 preview wrongly shows red.
[snip]
> I would prefer to see an non hacky way to do this. Perhaps a property called
> 'solid-color()'

Less abusively, you could just do "linear-gradient(blue, blue)".

Somewhat less hackily (mechanically, it's hacky, but it *looks* good
when you do it), just use "image(blue)" once image() is supported.
image()'s main functionality is letting you specify multiple urls and
fallback when they don't work, and you can supply a color as the final
fallback for the case when all the images fail.  "image(blue)" just
forgoes the images and skips straight to the fallback.  I think it
looks appropriate to create a blue image with "image(blue)".

~TJ

Received on Tuesday, 17 May 2011 01:23:45 UTC