Skip to content

Commit 61f15ba

Browse files
thoibergMoOx
authored andcommitted
Updated README with notes on migrating from Sass (postcss#39)
1 parent 539d571 commit 61f15ba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ No we cannot do that. `currentcolor` depends on the cascade (so the DOM) and we
100100
By using [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) before this plugin, you can do that (sort of).
101101
You have some examples in [cssnext playground](http://cssnext.io/playground/).
102102

103+
## Notes for former Sass users
104+
105+
`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):
106+
107+
```css
108+
$lighten(red, 20%)
109+
/* is equivalent to */
110+
color(red tint(20%))
111+
112+
$darken(red, 20%)
113+
/* is equivalent to */
114+
color(red shade(20%))
115+
```
116+
103117
---
104118

105119
## [Changelog](CHANGELOG.md)

0 commit comments

Comments
 (0)