| 1 |
$root_default: initial; |
| 2 |
$root_implicit: initial; |
| 3 |
$root_explicit: initial !global; |
| 4 |
|
| 5 |
@function fn() { |
| 6 |
@for $outer from 1 to 2 { |
| 7 |
$root_implicit: outer; |
| 8 |
$root_explicit: outer !global; |
| 9 |
$root_default: outer !default; |
| 10 |
$local_implicit: outer; |
| 11 |
$local_explicit: outer !global; |
| 12 |
$local_default: outer !default; |
| 13 |
@for $inner from 3 to 4 { |
| 14 |
$root_implicit: inner; |
| 15 |
$root_explicit: inner !global; |
| 16 |
$root_default: inner !default; |
| 17 |
$local_implicit: inner; |
| 18 |
$local_explicit: inner !global; |
| 19 |
$local_default: inner !default; |
| 20 |
} |
| 21 |
} |
| 22 |
$check_implicit: $root_implicit !global; |
| 23 |
$check_explicit: $root_explicit !global; |
| 24 |
$check_default: $root_default !global; |
| 25 |
@return null; |
| 26 |
} |
| 27 |
|
| 28 |
result { |
| 29 |
fn: fn(); |
| 30 |
@if variable-exists(outer) { |
| 31 |
outer: $outer; |
| 32 |
} |
| 33 |
@if variable-exists(inner) { |
| 34 |
inner: $inner; |
| 35 |
} |
| 36 |
@if variable-exists(check_implicit) { |
| 37 |
check_implicit: $check_implicit; |
| 38 |
} |
| 39 |
@if variable-exists(check_explicit) { |
| 40 |
check_explicit: $check_explicit; |
| 41 |
} |
| 42 |
@if variable-exists(check_default) { |
| 43 |
check_default: $check_default; |
| 44 |
} |
| 45 |
root_default: $root_default; |
| 46 |
root_implicit: $root_implicit; |
| 47 |
root_explicit: $root_explicit; |
| 48 |
@if variable-exists(local_default) { |
| 49 |
local_default: $local_default; |
| 50 |
} |
| 51 |
@if variable-exists(local_implicit) { |
| 52 |
local_implicit: $local_implicit; |
| 53 |
} |
| 54 |
@if variable-exists(local_explicit) { |
| 55 |
local_explicit: $local_explicit; |
| 56 |
} |
| 57 |
} |