<===> README.md
Most changes here should also be reflected in
core_functions/meta/load_css/with.hrx and directives/forward/with.hrx.
<===>
================================================================================
<===> single/input.scss
@use "other" with ($a: configured);
<===> single/_other.scss
$a: original !default;
b {c: $a}
<===> single/output.css
b {
c: configured;
}
<===>
================================================================================
<===> null/input.scss
@use "other" with ($a: null);
<===> null/_other.scss
$a: original !default;
b {c: $a}
<===> null/output.css
b {
c: original;
}
<===>
================================================================================
<===> trailing_comma/input.scss
@use "other" with ($a: configured,);
<===> trailing_comma/_other.scss
$a: original !default;
b {c: $a}
<===> trailing_comma/output.css
b {
c: configured;
}
<===>
================================================================================
<===> dash_insensitive/input.scss
@use "other" with ($a_b: configured);
<===> dash_insensitive/_other.scss
$a-b: original !default;
b {c: $a-b}
<===> dash_insensitive/output.css
b {
c: configured;
}
<===>
================================================================================
<===> multiple/input.scss
@use "other" with (
$a: configured a,
$b: configured b,
$c: configured c
);
<===> multiple/_other.scss
$a: original a !default;
$b: original b !default;
$c: original c !default;
d {
a: $a;
b: $b;
c: $c;
}
<===> multiple/output.css
d {
a: configured a;
b: configured b;
c: configured c;
}
<===>
================================================================================
<===> some_unconfigured/input.scss
@use "other" with ($a: configured a);
<===> some_unconfigured/_other.scss
$a: original a !default;
$b: original b !default;
c {
a: $a;
b: $b;
}
<===> some_unconfigured/output.css
c {
a: configured a;
b: original b;
}
<===>
================================================================================
<===> from_variable/input.scss
$a: configured;
@use "other" with ($a: $a);
<===> from_variable/_other.scss
$a: original a !default;
b {c: $a}
<===> from_variable/output.css
b {
c: configured;
}
<===>
================================================================================
<===> doesnt_run_default/input.scss
@use "other" with ($a: configured);
<===> doesnt_run_default/_other.scss
// This will throw an error if it's evaluated, but it shouldn't be because `$a`
// already has a value.
$a: 1px + 1em !default;
b {c: $a}
<===> doesnt_run_default/output.css
b {
c: configured;
}
<===>
================================================================================
<===> used_in_input/input.scss
@use "other" with ($a: configured);
b {c: other.$a}
<===> used_in_input/_other.scss
$a: original !default;
<===> used_in_input/output.css
b {
c: configured;
}
<===>
================================================================================
<===> variable_exists/input.scss
@use "other" with ($a: configured);
<===> variable_exists/_other.scss
$before-declaration: variable-exists(a);
$a: original !default;
b {
before-declaration: $before-declaration;
after-declaration: variable-exists(a);
}
<===> variable_exists/output.css
b {
before-declaration: false;
after-declaration: true;
}
<===>
================================================================================
<===> through_import/direct/input.scss
@use "used" with ($a: configured);
<===> through_import/direct/_used.scss
@import "imported";
<===> through_import/direct/_imported.scss
$a: original !default;
b {c: $a}
<===> through_import/direct/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_import/transitive/input.scss
@use "used" with ($a: configured);
<===> through_import/transitive/_used.scss
@import "midstream";
<===> through_import/transitive/_midstream.scss
@import "upstream";
<===> through_import/transitive/_upstream.scss
$a: original !default;
b {c: $a}
<===> through_import/transitive/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_forward/bare/input.scss
@use "used" with ($a: configured);
<===> through_forward/bare/_used.scss
@forward "forwarded";
<===> through_forward/bare/_forwarded.scss
$a: original !default;
b {c: $a}
<===> through_forward/bare/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_forward/transitive/input.scss
@use "used" with ($a: configured);
<===> through_forward/transitive/_used.scss
@forward "midstream";
<===> through_forward/transitive/_midstream.scss
@forward "upstream";
<===> through_forward/transitive/_upstream.scss
$a: original !default;
b {c: $a}
<===> through_forward/transitive/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_forward/show/input.scss
@use "used" with ($a: configured);
<===> through_forward/show/_used.scss
@forward "forwarded" show $a;
<===> through_forward/show/_forwarded.scss
$a: original !default;
b {c: $a}
<===> through_forward/show/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_forward/with/default/input.scss
@use "used" with ($a: from input);
<===> through_forward/with/default/_used.scss
@forward "forwarded" with ($a: from used !default);
<===> through_forward/with/default/_forwarded.scss
$a: from forwarded !default;
b {c: $a}
<===> through_forward/with/default/output.css
b {
c: from input;
}
<===>
================================================================================
<===> through_forward/with/null/input.scss
@use "used" with ($a: null);
<===> through_forward/with/null/_used.scss
@forward "forwarded" with ($a: from used !default);
<===> through_forward/with/null/_forwarded.scss
$a: from forwarded !default;
b {c: $a}
<===> through_forward/with/null/output.css
b {
c: from used;
}
<===>
================================================================================
<===> through_forward/with/unconfigured/input.scss
@use "used" with ($a: from input);
<===> through_forward/with/unconfigured/_used.scss
@forward "forwarded" with ($b: from used);
<===> through_forward/with/unconfigured/_forwarded.scss
$a: from forwarded !default;
$b: from forwarded !default;
c {
a: $a;
b: $b;
}
<===> through_forward/with/unconfigured/output.css
c {
a: from input;
b: from used;
}
<===>
================================================================================
<===> through_forward/hide/input.scss
@use "used" with ($a: configured);
<===> through_forward/hide/_used.scss
@forward "forwarded" hide $b;
<===> through_forward/hide/_forwarded.scss
$a: original !default;
b {c: $a}
<===> through_forward/hide/output.css
b {
c: configured;
}
<===>
================================================================================
<===> through_forward/as/input.scss
@use "used" with ($b-a: configured);
<===> through_forward/as/_used.scss
@forward "forwarded" as b-*;
<===> through_forward/as/_forwarded.scss
$a: original !default;
c {d: $a}
<===> through_forward/as/output.css
c {
d: configured;
}
<===>
================================================================================
<===> through_forward/with_unrelated_config/input.scss
@use "used" with ($from-used: configured);
<===> through_forward/with_unrelated_config/_used.scss
@forward "forwarded";
$from-used: original !default;
a {from-used: $from-used}
<===> through_forward/with_unrelated_config/_forwarded.scss
$from-forwarded: original !default;
b {from-forwarded: $from-forwarded}
<===> through_forward/with_unrelated_config/output.css
b {
from-forwarded: original;
}
a {
from-used: configured;
}
<===>
================================================================================
<===> through_forward/and_use/input.scss
// Regression test for sass/sass#2744.
@use "forwarder" with ($c: e);
a {b: forwarder.$c}
<===> through_forward/and_use/_forwarder.scss
@forward "definition";
@forward "user";
<===> through_forward/and_use/_definition.scss
$c: d !default;
<===> through_forward/and_use/_user.scss
@use "definition";
<===> through_forward/and_use/output.css
a {
b: e;
}
<===>
================================================================================
<===> core_module/indirect/use/input.scss
// Regression test for sass/dart-sass#838.
@use "other" with ($c: e);
a {b: other.$c}
<===> core_module/indirect/use/_other.scss
@use "sass:color";
$c: d !default;
<===> core_module/indirect/use/output.css
a {
b: e;
}
<===>
================================================================================
<===> core_module/indirect/forward/input.scss
// Regression test for sass/dart-sass#838.
@use "other" with ($c: e);
a {b: other.$c}
<===> core_module/indirect/forward/_other.scss
@forward "sass:color";
$c: d !default;
<===> core_module/indirect/forward/output.css
a {
b: e;
}
<===>
================================================================================
<===> multi_load/README.md
If a module is first loaded with a configuration, future loads with no
configuration will use the configured module.
<===>
================================================================================
<===> multi_load/use/input.scss
@use "upstream" with ($a: configured);
@use "midstream";
<===> multi_load/use/_midstream.scss
@use "upstream";
b {c: upstream.$a}
<===> multi_load/use/_upstream.scss
$a: original !default;
<===> multi_load/use/output.css
b {
c: configured;
}
<===>
================================================================================
<===> multi_load/forward/input.scss
@use "upstream" with ($a: configured);
@use "midstream";
b {c: midstream.$a}
<===> multi_load/forward/_midstream.scss
@forward "upstream";
<===> multi_load/forward/_upstream.scss
$a: original !default;
<===> multi_load/forward/output.css
b {
c: configured;
}
<===>
================================================================================
<===> multi_load/transitive/input.scss
// Regression test for sass/dart-sass#854.
@use "midstream1" with ($a: overridden 1);
@use "midstream2" with ($a: overridden 2);
b {
midstream1: midstream1.$a;
midstream2: midstream2.$a;
}
<===> multi_load/transitive/_midstream1.scss
@use "upstream";
$a: default 1 !default;
<===> multi_load/transitive/_midstream2.scss
@use "upstream";
$a: default 2 !default;
<===> multi_load/transitive/_upstream.scss
c {d: e}
<===> multi_load/transitive/output.css
c {
d: e;
}
b {
midstream1: overridden 1;
midstream2: overridden 2;
}