From 8e97e71e662c8cdda5559655fe1989eab4053589 Mon Sep 17 00:00:00 2001 From: coskunuyar <34946061+coskunuyar@users.noreply.github.com> Date: Mon, 1 Jun 2020 20:31:10 +0300 Subject: [PATCH] Invalid Examples (#451) * Fix invalid semicolon on SASS example * Fix wrong argument reference * Fix invalid assignment to variable due to scope --- source/code-snippets/_example-advanced-nesting.html.md.erb | 2 +- source/documentation/at-rules/control/each.html.md.erb | 2 +- source/documentation/at-rules/control/while.html.md.erb | 2 +- source/documentation/values/lists.html.md.erb | 4 ++-- source/documentation/values/maps.html.md.erb | 6 +++--- source/documentation/values/null.html.md.erb | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/code-snippets/_example-advanced-nesting.html.md.erb b/source/code-snippets/_example-advanced-nesting.html.md.erb index 1b95234..0889343 100644 --- a/source/code-snippets/_example-advanced-nesting.html.md.erb +++ b/source/code-snippets/_example-advanced-nesting.html.md.erb @@ -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)} diff --git a/source/documentation/at-rules/control/each.html.md.erb b/source/documentation/at-rules/control/each.html.md.erb index 7635e7c..19d2461 100644 --- a/source/documentation/at-rules/control/each.html.md.erb +++ b/source/documentation/at-rules/control/each.html.md.erb @@ -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 diff --git a/source/documentation/at-rules/control/while.html.md.erb b/source/documentation/at-rules/control/while.html.md.erb index 849f59d..629e9bd 100644 --- a/source/documentation/at-rules/control/while.html.md.erb +++ b/source/documentation/at-rules/control/while.html.md.erb @@ -25,7 +25,7 @@ introduction: > @function scale-below($value, $base, $ratio: 1.618) @while $value > $base $value: $value / $ratio - @return $value; + @return $value diff --git a/source/documentation/values/lists.html.md.erb b/source/documentation/values/lists.html.md.erb index c8c74ac..7595f82 100644 --- a/source/documentation/values/lists.html.md.erb +++ b/source/documentation/values/lists.html.md.erb @@ -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}." // ... diff --git a/source/documentation/values/maps.html.md.erb b/source/documentation/values/maps.html.md.erb index 80ea60d..adf74b0 100644 --- a/source/documentation/values/maps.html.md.erb +++ b/source/documentation/values/maps.html.md.erb @@ -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) diff --git a/source/documentation/values/null.html.md.erb b/source/documentation/values/null.html.md.erb index e4cf1cd..49840fc 100644 --- a/source/documentation/values/null.html.md.erb +++ b/source/documentation/values/null.html.md.erb @@ -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