Skip to content

Commit

Permalink
Merge indented syntax into other examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Oct 30, 2024
1 parent 5cf5060 commit 644da98
Show file tree
Hide file tree
Showing 20 changed files with 750 additions and 378 deletions.
54 changes: 54 additions & 0 deletions spec/arguments/invocation.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,57 @@ Error: Positional arguments must come before keyword arguments.
| ^
'
input.scss 3:14 root stylesheet

<===>
================================================================================
<===> function/error/multi-line-arguments/declaration/input.sass
@function a(
$b,
$c
)
@return d

e
f: a(g, h)

<===> function/error/multi-line-arguments/declaration/error
Error: expected ")".
,
1 | @function a(
| ^
'
input.sass 1:13 root stylesheet

<===>
================================================================================
<===> function/error/multi-line-arguments/invocation/input.sass
@function a($b, $c)
@return d

e
f: a(
g,
h
)

<===> function/error/multi-line-arguments/invocation/error
Error: expected ")".
,
5 | f: a(
| ^
'
input.sass 5:8 root stylesheet

<===>
================================================================================
<===> function/arguments/input.sass
@function a($b, $c)
@return d

e
f: a(g, h)

<===> function/arguments/output.css
e {
f: d;
}
19 changes: 19 additions & 0 deletions spec/css/custom_properties/trailing_whitespace.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@
--newline: value ;
--before-closing-brace: value ;
}

<===>
================================================================================
<===> sass/input.sass
.trailing-whitespace
--space: value
--tab: value
--newline: value

--before-closing-brace: value


<===> sass/output.css
.trailing-whitespace {
--space: value ;
--tab: value ;
--newline: value ;
--before-closing-brace: value ;
}
54 changes: 52 additions & 2 deletions spec/css/custom_properties/value_interpolation.hrx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<===> input.scss
<===> scss/input.scss

Check failure on line 1 in spec/css/custom_properties/value_interpolation.hrx

View workflow job for this annotation

GitHub Actions / Lint spec files

The test directory "spec/css/custom_properties/value_interpolation/scss/linebreak-interpolation" cannot be nested in the test directory "spec/css/custom_properties/value_interpolation/scss".
.value-interpolation {
// Interpolation is the only Sass construct that's supported in custom
// variables.
Expand All @@ -9,11 +9,61 @@
--in-uri: uri(foo#{1 + 2}bar);
}

<===> output.css
<===> scss/linebreak-interpolation/input.scss
.a{
--b: #{1
+
2};
}

<===> scss/linebreak-interpolation/output.css
.a {
--b: 3;
}

<===> scss/output.css
.value-interpolation {
--alone: 3;
--in-list: a 3 c;
--in-ident: foo3bar;
--in-string: "foo3bar";
--in-uri: uri(foo3bar);
}

<===>
================================================================================
<===> sass/input.sass
.value-interpolation
--alone: #{1 + 2}
--in-list: a #{1 + 2} c
--in-ident: foo#{1 + 2}bar
--in-string: "foo#{1 + 2}bar"
--in-uri: uri(foo#{1 + 2}bar)

<===> sass/linebreak-interpolation/output.css

<===> sass/output.css
.value-interpolation {
--alone: 3;
--in-list: a 3 c;
--in-ident: foo3bar;
--in-string: "foo3bar";
--in-uri: uri(foo3bar);
}

<===>
================================================================================
<===> error/sass/linebreak-interpolation/input.sass
.a
--b: #{1
+
2}


<===> error/sass/linebreak-interpolation/error
Error: expected "}".
,
2 | --b: #{1
| ^
'
input.sass 2:12 root stylesheet
96 changes: 96 additions & 0 deletions spec/directives/each.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<===> inline/input.sass

@each $a in b, c
.#{$a}
d: $a

<===> inline/output.css
.b {
d: b;
}

.c {
d: c;
}

<===>
================================================================================
<===> error/multiline/after-each/input.sass

@each
$a in b, c
.#{$a}
d: $a

<===> error/multiline/after-each/error
Error: expected "$".
,
2 | @each
| ^
'
input.sass 2:6 root stylesheet

<===>
================================================================================
<===> error/multiline/after-variable/input.sass

@each $a
in b, c
.#{$a}
d: $a

<===> error/multiline/after-variable/error
Error: Expected "in".
,
2 | @each $a
| ^
'
input.sass 2:10 root stylesheet

<===>
================================================================================
<===> error/multiline/after-in/input.sass

@each $a in
b, c
.#{$a}
d: $a

<===> error/multiline/after-in/error
Error: Expected expression.
,
2 | @each $a in
| ^
'
input.sass 2:12 root stylesheet

<===>
================================================================================
<===> error/multiline/in-expression/input.sass

@each $a in b,
c
.#{$a}
d: $a

<===> error/multiline/in-expression/output.css
c .b {
d: b;
}

<===>
================================================================================
<===> error/multiline/in-wrapped-expression/input.sass

@each $a in (b,
c)
.#{$a}
d: $a

<===> error/multiline/in-wrapped-expression/error
Error: expected ")".
,
2 | @each $a in (b,
| ^
'
input.sass 2:16 root stylesheet
Loading

0 comments on commit 644da98

Please sign in to comment.