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:
coskunuyar 2020-06-01 20:31:10 +03:00 committed by GitHub
parent e440cee626
commit 8e97e71e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View File

@ -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)}

View File

@ -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

View File

@ -25,7 +25,7 @@ introduction: >
@function scale-below($value, $base, $ratio: 1.618)
@while $value > $base
$value: $value / $ratio
@return $value;
@return $value

View File

@ -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}."
// ...

View File

@ -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)

View File

@ -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