diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:42:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:42:42 -0300 |
commit | 711dab09b5146e74dbeda56679c65e3b6bec71f3 (patch) | |
tree | fed51be1475322c7a565d180d0b0ae3f97e6cf3a /mod/less/vendors/lessphp/tests/inputs/colors.less | |
parent | 4311cd55c6e6d6a064bfeabb53b9c528ca553ffd (diff) | |
parent | 551497ef94f6239b109316d8fab32f0909b13f73 (diff) | |
download | elgg-711dab09b5146e74dbeda56679c65e3b6bec71f3.tar.gz elgg-711dab09b5146e74dbeda56679c65e3b6bec71f3.tar.bz2 |
Merge commit '551497ef94f6239b109316d8fab32f0909b13f73' as 'mod/less'
Diffstat (limited to 'mod/less/vendors/lessphp/tests/inputs/colors.less')
-rw-r--r-- | mod/less/vendors/lessphp/tests/inputs/colors.less | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/mod/less/vendors/lessphp/tests/inputs/colors.less b/mod/less/vendors/lessphp/tests/inputs/colors.less new file mode 100644 index 000000000..d407a74f3 --- /dev/null +++ b/mod/less/vendors/lessphp/tests/inputs/colors.less @@ -0,0 +1,122 @@ + +body { + color: hsl(34, 50%, 40%); + color: hsla(34, 50%, 40%, 0.3); + + lighten: lighten(#efefef, 10%); + lighten: lighten(rgb(23, 53, 231), 22%); + lighten: lighten(rgba(212, 103, 88, 0.5), 10%); + + darken: darken(#efefef, 10%); + darken: darken(rgb(23, 53, 231), 22%); + darken: darken(rgba(23, 53, 231, 0.5), 10%); + + saturate: saturate(#efefef, 10%); + saturate: saturate(rgb(23, 53, 231), 22%); + saturate: saturate(rgba(23, 53, 231, 0.5), 10%); + + desaturate: desaturate(#efefef, 10%); + desaturate: desaturate(rgb(23, 53, 231), 22%); + desaturate: desaturate(rgba(23, 53, 231, 0.5), 10%); + + spin: spin(#efefef, 12); + spin: spin(rgb(23, 53, 231), 15); + spin: spin(rgba(23, 53, 231, 0.5), 19); + + spin: spin(#efefef, -12); + spin: spin(rgb(23, 53, 231), -15); + spin: spin(rgba(23, 53, 231, 0.5), -19); + + one: fadein(#abcdef, 10%); + one: fadeout(#abcdef, -10%); + + two: fadeout(#029f23, 10%); + two: fadein(#029f23, -10%); + + + three: fadein(rgba(1,2,3, 0.5), 10%); + three: fadeout(rgba(1,2,3, 0.5), -10%); + + four: fadeout(rgba(1,2,3, 0), 10%); + four: fadein(rgba(1,2,3, 0), -10%); + + hue: hue(rgb(34,20,40)); + sat: saturation(rgb(34,20,40)); + lit: lightness(rgb(34,20,40)); + + @old: #34fa03; + @new: hsl(hue(@old), 45%, 90%); + what: @new; + + zero: saturate(#123456, -100%); + zero: saturate(#123456, 100%); + zero: saturate(#000000, 100%); + zero: saturate(#ffffff, 100%); + + zero: lighten(#123456, -100%); + zero: lighten(#123456, 100%); + zero: lighten(#000000, 100%); + zero: lighten(#ffffff, 100%); + + zero: spin(#123456, -100); + zero: spin(#123456, 100); + zero: spin(#000000, 100); + zero: spin(#ffffff, 100); +} + + +alpha { + // g: alpha(red); + g: alpha(rgba(0,0,0,0)); + g: alpha(rgb(155,55,0)); +} + +fade { + f: fade(red, 50%); + f: fade(#fff, 20%); + f: fade(rgba(34,23,64,0.4), 50%); +} + +@a: rgb(255,255,255); +@b: rgb(0,0,0); + +.mix { + color: mix(@a, @b, 50%); +} + +.percent { + per: percentage(0.5); +} + +// color keywords + +.colorz { + color: whitesmoke - 10; + color: spin(red, 34); +} + + + +// purposfuly whacky to match less.js + +@color: #fcf8e3; + +body { + start: @color; + spin: spin(@color, -10); // #fcf4e3 + chained: darken(spin(@color, -10), 3%); // gives #fbeed5, should be #fbefd5 + direct: darken(#fcf4e3, 3%); // #fbefd5 +} + +// spin around +pre { + @errorBackground: #f2dede; + spin: spin(@errorBackground, -10); +} + +dd { + @white: #fff; + background-color: mix(@white, darken(@white, 10%), 60%); +} + + |