From 603e2e2eac132847e79c3d5066c33999e82a85af Mon Sep 17 00:00:00 2001 From: Tim Hoiberg Date: Thu, 20 Apr 2017 23:14:57 +1000 Subject: [PATCH] Updated README with notes on migrating from Sass --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7980658..c8ff176 100755 --- a/README.md +++ b/README.md @@ -100,6 +100,20 @@ No we cannot do that. `currentcolor` depends on the cascade (so the DOM) and we By using [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) before this plugin, you can do that (sort of). You have some examples in [cssnext playground](http://cssnext.io/playground/). +## Notes for former Sass users + +`lighten` and `darken` are Sass specific methods and not supported by native CSS specs. The same functionality can be achieved with the [tint and shade adjusters](https://drafts.csswg.org/css-color/#tint-shade-adjusters): + +```css +$lighten(red, 20%) +/* is equivalent to */ +color(red tint(20%)) + +$darken(red, 20%) +/* is equivalent to */ +color(red shade(20%)) +``` + --- ## [Changelog](CHANGELOG.md)