mirror of
https://github.com/danog/sass-site.git
synced 2024-11-27 04:24:50 +01:00
Invalid Examples (#451)
* Fix invalid semicolon on SASS example * Fix wrong argument reference * Fix invalid assignment to variable due to scope
This commit is contained in:
parent
e440cee626
commit
8e97e71e66
@ -22,7 +22,7 @@ uses the [`selector.unify()` function][] to combine `&` with a user's selector.
|
||||
}
|
||||
}
|
||||
===
|
||||
@use "sass:selector";
|
||||
@use "sass:selector"
|
||||
|
||||
@mixin unify-parent($child)
|
||||
@at-root #{selector.unify(&, $child)}
|
||||
|
@ -47,7 +47,7 @@ is assigned to the value at the corresponding position in the list, or
|
||||
}
|
||||
}
|
||||
===
|
||||
$icons: "eye" "\f112" 12px, "start" "\f12e" 16px, "stop" "\f12f" 10px;
|
||||
$icons: "eye" "\f112" 12px, "start" "\f12e" 16px, "stop" "\f12f" 10px
|
||||
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ introduction: >
|
||||
@function scale-below($value, $base, $ratio: 1.618)
|
||||
@while $value > $base
|
||||
$value: $value / $ratio
|
||||
@return $value;
|
||||
@return $value
|
||||
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ check whether a list does or doesn't contain a given value.
|
||||
|
||||
@mixin attach($side) {
|
||||
@if not list.index($valid-sides, $side) {
|
||||
@error "#{$side} is not a valid side. Expected one of #{$sides}.";
|
||||
@error "#{$side} is not a valid side. Expected one of #{$valid-sides}.";
|
||||
}
|
||||
|
||||
// ...
|
||||
@ -125,7 +125,7 @@ check whether a list does or doesn't contain a given value.
|
||||
|
||||
@mixin attach($side)
|
||||
@if not list.index($valid-sides, $side)
|
||||
@error "#{$side} is not a valid side. Expected one of #{$sides}."
|
||||
@error "#{$side} is not a valid side. Expected one of #{$valid-sides}."
|
||||
|
||||
|
||||
// ...
|
||||
|
@ -160,19 +160,19 @@ configuration in a map.
|
||||
$prefixes-by-browser: ("firefox": moz, "safari": webkit, "ie": ms);
|
||||
|
||||
@mixin add-browser-prefix($browser, $prefix) {
|
||||
$prefixes-by-browser: map.merge($prefixes-by-browser, ($browser: $prefix));
|
||||
$prefixes-by-browser: map.merge($prefixes-by-browser, ($browser: $prefix)) !global;
|
||||
}
|
||||
|
||||
@include add-browser-prefix("opera", o);
|
||||
@debug $prefixes-by-browser;
|
||||
// ("firefox": moz, "safari": webkit, "ie": ms, "opera": o)
|
||||
===
|
||||
@use "sass:map";
|
||||
@use "sass:map"
|
||||
|
||||
$prefixes-by-browser: ("firefox": moz, "safari": webkit, "ie": ms)
|
||||
|
||||
@mixin add-browser-prefix($browser, $prefix)
|
||||
$prefixes-by-browser: map.merge($prefixes-by-browser, ($browser: $prefix))
|
||||
$prefixes-by-browser: map.merge($prefixes-by-browser, ($browser: $prefix)) !global
|
||||
|
||||
|
||||
@include add-browser-prefix("opera", o)
|
||||
|
@ -14,8 +14,8 @@ introduction: >
|
||||
@debug map.get(("large": 20px), "small"); // null
|
||||
@debug &; // null
|
||||
===
|
||||
@use "sass:map";
|
||||
@use "sass:string";
|
||||
@use "sass:map"
|
||||
@use "sass:string"
|
||||
|
||||
@debug string.index("Helvetica Neue", "Roboto") // null
|
||||
@debug map.get(("large": 20px), "small") // null
|
||||
|
Loading…
Reference in New Issue
Block a user