From 1d3ee444eb248b644dff4572fb807f22f9709fe1 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 7 Aug 2015 10:15:16 +0800 Subject: [PATCH] Fix read section for less (issue #7) --- README.md | 12 ++++++++---- test/less.css | 2 +- test/sass.css | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c07b519..eea6898 100644 --- a/README.md +++ b/README.md @@ -86,16 +86,20 @@ Import [palette.less](http://danlevan.github.io/google-material-color/dist/palet @import 'palette'; ... -.my-div { +.issue-7 { .palette('Light Blue', '700'); background-color: @palette; - .palette('Red'); // default shade is 500 - color: @palette; + // get @palette in its own scope otherwise @palette will be overwritten + &{ + .palette('Red'); // default shade is 500 + color: @palette; + } } + ``` -If you need access to the variables, you can access it through variablec like `@palette-Light-Blue-500` +If you need access to the variables, you can access it through variable like `@palette-Light-Blue-500` ### CSS diff --git a/test/less.css b/test/less.css index ff41800..0a72a03 100644 --- a/test/less.css +++ b/test/less.css @@ -1,5 +1,5 @@ /** - * google-material-color v1.1.0 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ .less.Red { diff --git a/test/sass.css b/test/sass.css index a6d55c3..3405733 100644 --- a/test/sass.css +++ b/test/sass.css @@ -1,5 +1,5 @@ /** - * google-material-color v1.1.0 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ .sass.Red {