postcss-color-function icon indicating copy to clipboard operation
postcss-color-function copied to clipboard

Better docs with examples

Open ai opened this issue 10 years ago • 10 comments

We should add better docs with examples for popular user cases like lighten/darken color. Now you need to open W3C spec and it is very bad for quick look. There is no examples or any way to find answer quickly.

For example, some people even think, that plugin didn’t support lighten :).

/cc @MoOx

ai avatar Jan 14 '15 00:01 ai

Most people don't look for before asking.

Anyway I've update the readme a little. Tell me if that enough.

MoOx avatar Jan 14 '15 17:01 MoOx

[lightness( | l(] ['+' | '-' | '*']? <percentage> ) is too complicated without examples :(. “lightness has a l alias” is better for first part of statement. What does * mean?

ai avatar Jan 14 '15 17:01 ai

blend( <color> <percentage> [rgb | hsl | hwb]? ) what is default value if I miss last arg? Also many people didn’t know hos blend depends on color mode.

ai avatar Jan 14 '15 17:01 ai

But now it is better :).

ai avatar Jan 14 '15 17:01 ai

More examples would really clear things up :+1:

MadLittleMods avatar May 13 '15 01:05 MadLittleMods

Need example of how to make this: scale-color($MYcolor, $saturation: +5%, $lightness: -16%);

And how to output Hex values.

ghost avatar Jul 17 '15 10:07 ghost

background: color(var(--blue) lightness(5%));

9mm avatar Sep 18 '15 16:09 9mm

You are repeatedly refer to the specification, but I don't see any link. Add it, please: https://drafts.csswg.org/css-color/#modifying-colors

Ser-Gen avatar Dec 09 '15 08:12 Ser-Gen

You can do it yourself. PR are always welcome.

MoOx avatar Dec 09 '15 09:12 MoOx

Done: #20.

Ser-Gen avatar Dec 09 '15 09:12 Ser-Gen