app/assets/stylesheets/settings/functions/_background.sass in oulu-0.19.1 vs app/assets/stylesheets/settings/functions/_background.sass in oulu-1.0.0.beta1
- old
+ new
@@ -3,55 +3,37 @@
@return true
@else
@return null
@function background_position($value)
- @if list($value)
- @if string(nth($value, 1)) and not str-index(nth($value, 1), '/')
- @return true
- @else if string(nth($value, 1)) and not str-index(nth($value, 1), '\/')
- @return true
- @else if number(nth($value, 1))
- @return true
- @else
- @return null
+ @if list($value) and nth($value, 1) != size
+ @return true
@else
@return null
@function background_size($value)
- @if $value == auto or $value == contain or $value == cover
- @return true
+ @if string($value)
+ @if $value == 'auto' or $value == 'contain' or $value == 'cover'
+ @return unquote('/') $value
+ @else
+ @return null
@else if list($value)
- @if string(nth($value, 1)) and str-index(nth($value, 1), '\/')
- @return ture
- @else if string(nth($value, 1)) and str-index(nth($value, 1), '/')
- @return ture
+ @if nth($value, 1) == size
+ @return unquote('/') nth($value, 2) nth($value, 3)
@else
@return null
@else
@return null
-@function background_size_value($value)
- @if background_size($value)
- @if list($value)
- @if string(nth($value, 1)) and str-index(nth($value, 1), '\/')
- @return unquote(string-replace(nth($value, 1), '\\/', '/') + ' ' + nth($value, 2))
- @else
- @return unquote('/' + $value)
- @else
- @return unquote('/' + $value)
- @else
- @return null
-
@function background_repeat($value)
- @if $value == no-repeat or $value == repeat or $value == repeat-x or $value == repeat-y
+ @if $value == 'no-repeat' or $value == 'repeat' or $value == 'repeat-x' or $value == 'repeat-y'
@return true
@else
@return null
@function background_attachment($value)
- @if $value == fixed or $value == scroll
+ @if $value == 'fixed' or $value == 'scroll'
@return true
@else
@return null
@function background_image($value)
@@ -68,9 +50,12 @@
@return null
@else
@return null
@function background_clip($value)
- @if $value == \"border" or $value == \"padding" or $value == \"content" or $value == \"text"
- @return true
+ @if string($value)
+ @if $value == 'border' or $value == 'padding' or $value == 'content' or $value == 'text'
+ @return true
+ @else
+ @return null
@else
@return null