complete redesign: use nodejs on server instead of php - documentation to be updated

This commit is contained in:
Marc Wäckerlin
2016-01-10 23:17:30 +00:00
parent 1c3765955b
commit a56d3118de
1376 changed files with 183732 additions and 1253 deletions

35
nodejs/node_modules/stylus/lib/functions/saturation.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
var nodes = require('../nodes')
, hsla = require('./hsla')
, component = require('./component');
/**
* Return the saturation component of the given `color`,
* or set the saturation component to the optional second `value` argument.
*
* Examples:
*
* saturation(#00c)
* // => 100%
*
* saturation(#00c, 50%)
* // => #339
*
* @param {RGBA|HSLA} color
* @param {Unit} [value]
* @return {Unit|RGBA}
* @api public
*/
module.exports = function saturation(color, value){
if (value) {
var hslaColor = color.hsla;
return hsla(
new nodes.Unit(hslaColor.h),
value,
new nodes.Unit(hslaColor.l),
new nodes.Unit(hslaColor.a)
)
}
return component(color, new nodes.String('saturation'));
};