diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-03-28 12:19:15 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-03-29 12:21:12 +0300 |
commit | 1482d63643f3d03a7fa887a5de7cc251b1313a11 (patch) | |
tree | 2387a03fc3025bdee54fc99ac0c20d31cc959d12 /WebContent/VAADIN/themes/valo/util/_gradient.scss | |
parent | 730b552cc13ea596b0fe680ce40c053786c070f7 (diff) | |
download | vaadin-framework-1482d63643f3d03a7fa887a5de7cc251b1313a11.tar.gz vaadin-framework-1482d63643f3d03a7fa887a5de7cc251b1313a11.zip |
Build vaadin-themes with maven
Change-Id: Ie40ea2c74358f6bf35a5a36a98561fd53fffe23f
Diffstat (limited to 'WebContent/VAADIN/themes/valo/util/_gradient.scss')
-rw-r--r-- | WebContent/VAADIN/themes/valo/util/_gradient.scss | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/WebContent/VAADIN/themes/valo/util/_gradient.scss b/WebContent/VAADIN/themes/valo/util/_gradient.scss deleted file mode 100644 index a38dca704c..0000000000 --- a/WebContent/VAADIN/themes/valo/util/_gradient.scss +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Outputs cross-browser Valo-specific linear gradient background-image declarations. - * - * @group style - * - * @param {color} $color ($v-background-color) - The base color for the gradient color stops - * @param {list} $gradient ($v-gradient) - Valo-specific gradient value. See the documentation for $v-gradient. - * @param {color} $fallback (null) - A fallback color for browser which do not support linear gradients (IE8 and IE9 in particular). If null, the base $color is used instead. - * @param {string} $direction (to bottom) - the direction of the linear gradient. The color stops are by default so that a lighter shade is at the start and a darker shade is at the end. - */ -@mixin valo-gradient($color: $v-background-color, $gradient: $v-gradient, $fallback: null, $direction: to bottom) { - @if $color { - @if $gradient { - $color-stops: valo-gradient-color-stops($color, $gradient); - @include linear-gradient($direction, $color-stops, $fallback: $fallback or $color); - } @else { - background: $fallback or $color; - } - } -} - -/** - * Returns a valid CSS, Valo-specific, color stop list to be used in a linear gradient. - * - * @group style - * - * @param {color} $color - the base color for the color stops - * @param {list} $gradient ($v-gradient) - Valo-specific gradient value. See the documentation for $v-gradient. - */ -@function valo-gradient-color-stops($color, $gradient: $v-gradient) { - $style: valo-gradient-style($gradient); - $opacity: valo-gradient-opacity($gradient); - - @if $style != none and $opacity > 0 { - @if $style == v-linear or $style == v-linear-reverse { - $start: blend-overlay(rgba(#fff, $opacity/100%), $color); - $end: blend-overlay(rgba(#000, max(0, $opacity/100%)), $color); - $end: blend-multiply(rgba(#000, max(0, $opacity/200%)), $end); - - @if $style == v-linear { - @return $start 2%, $end 98%; - } @else { - @return $end 2%, $start 98%; - } - } - } - - @return $color 0%, $color 100%; -} - - -/** - * Returns the style part of a Valo-specific gradient value. - * - * @param {list} $gradient ($v-gradient) - Valo-specific gradient value. See the documentation for $v-gradient. - * - * @return {string} One of the possible style values for $v-gradient - */ -@function valo-gradient-style($gradient: $v-gradient) { - @if type-of($gradient) != list { - @return none; - } - @return first-string($gradient); -} - -/** - * Returns the opacity part of a Valo-specific gradient value. - * - * @param {list} $gradient ($v-gradient) - Valo-specific gradient value. See the documentation for $v-gradient. - * - * @return {number} A percentage value from 0% to 100% - */ -@function valo-gradient-opacity($gradient: $v-gradient) { - @if type-of($gradient) != list { - @return 0%; - } - @return first-number($gradient); -} |