diff options
author | Henri Sara <hesara@vaadin.com> | 2014-06-30 09:17:50 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2014-06-30 09:17:50 +0300 |
commit | be0fd9bd74dfe597980017ac2174cb0027960527 (patch) | |
tree | ff56f51e0fa08bfe16c0b502ebf0de4e5030dd58 /WebContent/VAADIN/themes/valo/util | |
parent | cb13502c2255bf3435a9b144b59a0e7f76cd92f1 (diff) | |
download | vaadin-framework-be0fd9bd74dfe597980017ac2174cb0027960527.tar.gz vaadin-framework-be0fd9bd74dfe597980017ac2174cb0027960527.zip |
Fix !important handling in opacity mixin
This change makes the mixin opacity() compatible with both the
sass-lang implementation and our compiler.
Change-Id: I29923cb3cf6d876fcf39696608fe3a5e3222374d
Diffstat (limited to 'WebContent/VAADIN/themes/valo/util')
-rw-r--r-- | WebContent/VAADIN/themes/valo/util/_css3.scss | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/WebContent/VAADIN/themes/valo/util/_css3.scss b/WebContent/VAADIN/themes/valo/util/_css3.scss index ca354e89af..b1215d735f 100644 --- a/WebContent/VAADIN/themes/valo/util/_css3.scss +++ b/WebContent/VAADIN/themes/valo/util/_css3.scss @@ -1,11 +1,16 @@ -@mixin opacity ($o) { - opacity: $o; +@mixin opacity ($value, $important: false) { + $importantValue: null; + @if $important { + $importantValue: unquote("!important"); + } + + opacity: $value $importantValue; - $value: first-number($o); @if $value < 1 { - filter: alpha(opacity=$value*100) remove-nth($o, 1); + $valueperc: $value*100; + filter: alpha(opacity=#{$valueperc}) #{$importantValue}; } @else { - filter: none remove-nth($o, 1); + filter: none #{$importantValue}; } } |