summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/util/_gradient.scss
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni@vaadin.com>2014-08-29 13:57:46 +0300
committerVaadin Code Review <review@vaadin.com>2014-08-30 08:09:22 +0000
commiteac8c5a24f0bb93139a53aebd19ee91ed4ac4d16 (patch)
treea40db580360c7ae09516ab5711772559f10f62a2 /WebContent/VAADIN/themes/valo/util/_gradient.scss
parentf50b07abc784ae54af4ce7609d49013319eca57a (diff)
downloadvaadin-framework-eac8c5a24f0bb93139a53aebd19ee91ed4ac4d16.tar.gz
vaadin-framework-eac8c5a24f0bb93139a53aebd19ee91ed4ac4d16.zip
First batch of Valo Sass API documentation, plus bug fixes
Also updates the test to always scroll the left panel to the top after opening a section. Change-Id: Icdb42795b8ec347b91694c162898f41aa8d80152
Diffstat (limited to 'WebContent/VAADIN/themes/valo/util/_gradient.scss')
-rw-r--r--WebContent/VAADIN/themes/valo/util/_gradient.scss32
1 files changed, 32 insertions, 0 deletions
diff --git a/WebContent/VAADIN/themes/valo/util/_gradient.scss b/WebContent/VAADIN/themes/valo/util/_gradient.scss
index df159ad611..99490046ba 100644
--- a/WebContent/VAADIN/themes/valo/util/_gradient.scss
+++ b/WebContent/VAADIN/themes/valo/util/_gradient.scss
@@ -1,3 +1,13 @@
+/**
+ * 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 {
@@ -9,6 +19,14 @@
}
}
+/**
+ * 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);
@@ -31,6 +49,13 @@
}
+/**
+ * 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;
@@ -38,6 +63,13 @@
@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%;