stylus: update arrows

This commit is contained in:
Rico Sta. Cruz 2017-09-20 21:54:41 +08:00
parent f4970950e0
commit 5119f03f32
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 16 additions and 28 deletions

View File

@ -109,22 +109,10 @@ Mixins can be applied in two different ways.
### Argument defaults ### Argument defaults
```stylus ```stylus
border-radius(n=2px) border-radius(n = 2px)
-webkit-border-radius: n -webkit-border-radius: n
``` ```
{: data-line="1"}
Multiple args:
```stylus
xy(left, top)
left: left
top: top
```
```stylus
div
xy: 2px 2px
```
### Block mixins ### Block mixins
@ -262,9 +250,9 @@ See: [Interpolation](http://stylus-lang.com/docs/interpolation.html)
### Color operators ### Color operators
```stylus ```stylus
#888 + 50% // => #c3c3c3 (lighten) #888 + 50% // #c3c3c3 (lighten)
#888 - 50% // => #444 (darken) #888 - 50% // #444 (darken)
#f00 + 50deg // => #ffd500 (hue) #f00 + 50deg // #ffd500 (hue)
``` ```
### Casting ### Casting
@ -353,7 +341,7 @@ false
```stylus ```stylus
if val is a 'string' if val is a 'string'
if val is a 'ident' if val is a 'ident'
if #fff is a 'rgba' // => true if #fff is a 'rgba' // true
``` ```
See: [Instance check](http://stylus-lang.com/docs/operators.html#instance-check-is-a) See: [Instance check](http://stylus-lang.com/docs/operators.html#instance-check-is-a)
@ -365,20 +353,20 @@ Built-in functions
### Color functions ### Color functions
```stylus ```stylus
alpha(#fff) //=> 1 alpha(#fff) // 1
alpha(rgba(0, 0, 0, 0.2)) //=> 0.2 alpha(rgba(0, 0, 0, 0.2)) // 0.2
``` ```
```stylus ```stylus
dark(black) //=> true dark(black) // true
light(black) //=> false light(black) // false
``` ```
```stylus ```stylus
hue(#0a0) //=> 50deg hue(#0a0) // 50deg
saturation(#f00) //=> 100% saturation(#f00) // 100%
lightness(#f00) //=> 50% lightness(#f00) // 50%
luminosity(#f00) //=> 0.2126 luminosity(#f00) // 0.2126
``` ```
```stylus ```stylus
@ -454,7 +442,7 @@ See: [add-property](http://stylus-lang.com/docs/bifs.html#add-propertyname-expr)
```stylus ```stylus
'-webkit-gradient(%s, %s, %s)' % (linear (0 0) (0 100%)) '-webkit-gradient(%s, %s, %s)' % (linear (0 0) (0 100%))
// => -webkit-gradient(linear, 0 0, 0 100%) // -webkit-gradient(linear, 0 0, 0 100%)
``` ```
```stylus ```stylus
@ -467,7 +455,7 @@ See: [s](http://stylus-lang.com/docs/bifs.html#sfmt-)
``` ```
background: embedurl('logo.png') background: embedurl('logo.png')
// => background: url("data:image/png;base64,…") // background: url("data:image/png;base64,…")
``` ```
See: [embedurl](http://stylus-lang.com/docs/bifs.html#embedurlpath-encoding) See: [embedurl](http://stylus-lang.com/docs/bifs.html#embedurlpath-encoding)