diff --git a/spec/css/functions/special.hrx b/spec/css/functions/special.hrx index fd59cb3ae..96ba0108b 100644 --- a/spec/css/functions/special.hrx +++ b/spec/css/functions/special.hrx @@ -25,3 +25,187 @@ a {b: -a-calc(#{0})} a { b: -a-calc(0); } + +<===> +================================================================================ +<===> comment/calc/after_open_paren/loud/input.scss +a {b: -a-calc(/**/ c)} + +<===> comment/calc/after_open_paren/loud/output.css +a { + b: -a-calc(/**/ c); +} + +<===> +================================================================================ +<===> comment/calc/after_open_paren/silent/input.scss +a { + b: -a-calc(// + c); +} + +<===> comment/calc/after_open_paren/silent/output.css +a { + b: -a-calc( c); +} + +<===> +================================================================================ +<===> comment/calc/before_close_paren/loud/input.scss +a {b: -a-calc(c /**/)} + +<===> comment/calc/before_close_paren/loud/output.css +a { + b: -a-calc(c /**/); +} + +<===> +================================================================================ +<===> comment/calc/before_close_paren/silent/input.scss +a { + b: -a-calc(c // + ); +} + +<===> comment/calc/before_close_paren/silent/output.css +a { + b: -a-calc(c ); +} + +<===> +================================================================================ +<===> comment/element/after_open_paren/loud/input.scss +a {b: element(/**/ c)} + +<===> comment/element/after_open_paren/loud/output.css +a { + b: element(/**/ c); +} + +<===> +================================================================================ +<===> comment/element/after_open_paren/silent/input.scss +a { + b: element(// + c); +} + +<===> comment/element/after_open_paren/silent/output.css +a { + b: element( c); +} + +<===> +================================================================================ +<===> comment/element/before_close_paren/loud/input.scss +a {b: element(c /**/)} + +<===> comment/element/before_close_paren/loud/output.css +a { + b: element(c /**/); +} + +<===> +================================================================================ +<===> comment/element/before_close_paren/silent/input.scss +a { + b: element(c // + ); +} + +<===> comment/element/before_close_paren/silent/output.css +a { + b: element(c ); +} + +<===> +================================================================================ +<===> comment/expression/after_open_paren/loud/input.scss +a {b: expression(/**/ c)} + +<===> comment/expression/after_open_paren/loud/output.css +a { + b: expression(/**/ c); +} + +<===> +================================================================================ +<===> comment/expression/after_open_paren/silent/input.scss +a { + b: expression(// + c); +} + +<===> comment/expression/after_open_paren/silent/output.css +a { + b: expression( c); +} + +<===> +================================================================================ +<===> comment/expression/before_close_paren/loud/input.scss +a {b: expression(c /**/)} + +<===> comment/expression/before_close_paren/loud/output.css +a { + b: expression(c /**/); +} + +<===> +================================================================================ +<===> comment/expression/before_close_paren/silent/input.scss +a { + b: expression(c // + ); +} + +<===> comment/expression/before_close_paren/silent/output.css +a { + b: expression(c ); +} + +<===> +================================================================================ +<===> comment/progid/after_open_paren/loud/input.scss +a {b: progid:c(/**/ d)} + +<===> comment/progid/after_open_paren/loud/output.css +a { + b: progid:c(/**/ d); +} + +<===> +================================================================================ +<===> comment/progid/after_open_paren/silent/input.scss +a { + b: progid:c(// + d); +} + +<===> comment/progid/after_open_paren/silent/output.css +a { + b: progid:c( d); +} + +<===> +================================================================================ +<===> comment/progid/before_close_paren/loud/input.scss +a {b: progid:c(d /**/)} + +<===> comment/progid/before_close_paren/loud/output.css +a { + b: progid:c(d /**/); +} + +<===> +================================================================================ +<===> comment/progid/before_close_paren/silent/input.scss +a { + b: progid:c(d // + ); +} + +<===> comment/progid/before_close_paren/silent/output.css +a { + b: progid:c(d ); +} diff --git a/spec/css/style_rule.hrx b/spec/css/style_rule.hrx index fc8ed68ae..b7386e06c 100644 --- a/spec/css/style_rule.hrx +++ b/spec/css/style_rule.hrx @@ -1,15 +1,21 @@ <===> comment/after_selector/loud/input.scss -a /**/ {} +a /**/ {b: c} <===> comment/after_selector/loud/output.css +a { + b: c; +} <===> ================================================================================ <===> comment/after_selector/silent/input.scss a // - {} + {b: c} <===> comment/after_selector/silent/output.css +a { + b: c; +} <===> ================================================================================ diff --git a/spec/css/supports/comment.hrx b/spec/css/supports/comment.hrx index 74a6bf5b6..d1d1077ff 100644 --- a/spec/css/supports/comment.hrx +++ b/spec/css/supports/comment.hrx @@ -1,27 +1,376 @@ <===> before_query/loud/input.scss -@supports /**/ (a: b) {} +@supports /**/ (a: b) {c {d: e}} <===> before_query/loud/output.css +@supports (a: b) { + c { + d: e; + } +} <===> ================================================================================ <===> before_query/silent/input.scss @supports // - (a: b) {} + (a: b) {c {d: e}} <===> before_query/silent/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/after_open_paren/loud/input.scss +@supports (/**/ a: b) {c {d: e}} + +<===> declaration/normal_prop/after_open_paren/loud/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/after_open_paren/silent/input.scss +@supports (// + a: b) {c {d: e}} + +<===> declaration/normal_prop/after_open_paren/silent/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/before_colon/loud/input.scss +@supports (a /**/: b) {c {d: e}} + +<===> declaration/normal_prop/before_colon/loud/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/before_colon/silent/input.scss +@supports (a // + : b) {c {d: e}} + +<===> declaration/normal_prop/before_colon/silent/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/after_colon/loud/input.scss +@supports (a: /**/ b) {c {d: e}} + +<===> declaration/normal_prop/after_colon/loud/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/after_colon/silent/input.scss +@supports (a: // + b) {c {d: e}} + +<===> declaration/normal_prop/after_colon/silent/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/before_close_paren/loud/input.scss +@supports (a: b /**/) {c {d: e}} + +<===> declaration/normal_prop/before_close_paren/loud/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/normal_prop/before_close_paren/silent/input.scss +@supports (a: b // + ) {c {d: e}} + +<===> declaration/normal_prop/before_close_paren/silent/output.css +@supports (a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/after_open_paren/loud/input.scss +@supports (/**/ --a: b) {c {d: e}} + +<===> declaration/custom_prop/after_open_paren/loud/output.css +@supports (--a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/after_open_paren/silent/input.scss +@supports (// + --a: b) {c {d: e}} + +<===> declaration/custom_prop/after_open_paren/silent/output.css +@supports (--a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/before_colon/loud/input.scss +@supports (--a /**/: b) {c {d: e}} + +<===> declaration/custom_prop/before_colon/loud/output.css +@supports (--a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/before_colon/silent/input.scss +@supports (--a // + : b) {c {d: e}} + +<===> declaration/custom_prop/before_colon/silent/output.css +@supports (--a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/after_colon/loud/input.scss +@supports (--a: /**/ b) {c {d: e}} + +<===> declaration/custom_prop/after_colon/loud/output.css +@supports (--a: /**/ b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/after_colon/silent/input.scss +@supports (--a: // + b) {c {d: e}} + +<===> declaration/custom_prop/after_colon/silent/output.css +@supports (--a: b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/before_close_paren/loud/input.scss +@supports (--a: b /**/) {c {d: e}} + +<===> declaration/custom_prop/before_close_paren/loud/output.css +@supports (--a: b /**/) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> declaration/custom_prop/before_close_paren/silent/input.scss +@supports (--a: b // + ) {c {d: e}} + +<===> declaration/custom_prop/before_close_paren/silent/output.css +@supports (--a: b ) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> function/after_open_paren/loud/input.scss +@supports a(/**/ b) {c {d: e}} + +<===> function/after_open_paren/loud/output.css +@supports a(/**/ b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> function/after_open_paren/silent/input.scss +@supports a(// + b) {c {d: e}} + +<===> function/after_open_paren/silent/output.css +@supports a( + b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> function/before_close_paren/loud/input.scss +@supports a(b /**/) {c {d: e}} + +<===> function/before_close_paren/loud/output.css +@supports a(b /**/) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> function/before_close_paren/silent/input.scss +@supports a(b // + ) {c {d: e}} + +<===> function/before_close_paren/silent/output.css +@supports a(b + ) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/after_open_paren/loud/input.scss +@supports (/**/ a b) {c {d: e}} + +<===> anything/after_open_paren/loud/output.css +@supports (a b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/after_open_paren/silent/input.scss +@supports (// + a b) {c {d: e}} + +<===> anything/after_open_paren/silent/output.css +@supports (a b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/after_ident/loud/input.scss +@supports (a /**/ b) {c {d: e}} + +<===> anything/after_ident/loud/output.css +@supports (a /**/ b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/after_ident/silent/input.scss +@supports (a // + b) {c {d: e}} + +<===> anything/after_ident/silent/output.css +@supports (a + b) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/before_close_paren/loud/input.scss +@supports (a b /**/) {c {d: e}} + +<===> anything/before_close_paren/loud/output.css +@supports (a b /**/) { + c { + d: e; + } +} + +<===> +================================================================================ +<===> anything/before_close_paren/silent/input.scss +@supports (a b // + ) {c {d: e}} + +<===> anything/before_close_paren/silent/output.css +@supports (a b + ) { + c { + d: e; + } +} <===> ================================================================================ <===> after_query/loud/input.scss -@supports (a: b) /**/ {} +@supports (a: b) /**/ {c {d: e}} <===> after_query/loud/output.css +@supports (a: b) { + c { + d: e; + } +} <===> ================================================================================ <===> after_query/silent/input.scss @supports (a: b) // - {} + {c {d: e}} <===> after_query/silent/output.css +@supports (a: b) { + c { + d: e; + } +} diff --git a/spec/css/unknown_directive/comment.hrx b/spec/css/unknown_directive/comment.hrx index c47a0ee37..2ac15252c 100644 --- a/spec/css/unknown_directive/comment.hrx +++ b/spec/css/unknown_directive/comment.hrx @@ -15,22 +15,14 @@ <===> ================================================================================ -<===> no_children/after_value/loud/options.yml -:todo: - - sass/dart-sass#2263 - <===> no_children/after_value/loud/input.scss @a b /**/ <===> no_children/after_value/loud/output.css -@a b; +@a b /**/; <===> ================================================================================ -<===> no_children/after_value/silent/options.yml -:todo: - - sass/dart-sass#2263 - <===> no_children/after_value/silent/input.scss @a b // @@ -72,28 +64,20 @@ <===> ================================================================================ -<===> children/after_value/loud/options.yml -:todo: - - sass/dart-sass#2263 - <===> children/after_value/loud/input.scss @a b /**/ {} <===> children/after_value/loud/output.css -@a b {}; +@a b /**/ {} <===> ================================================================================ -<===> children/after_value/silent/options.yml -:todo: - - sass/dart-sass#2263 - <===> children/after_value/silent/input.scss @a b // {} <===> children/after_value/silent/output.css -@a b {}; +@a b {} <===> ================================================================================ diff --git a/spec/css/unknown_directive/plain.hrx b/spec/css/unknown_directive/plain.hrx index fd2cecd38..2e90f9a46 100644 --- a/spec/css/unknown_directive/plain.hrx +++ b/spec/css/unknown_directive/plain.hrx @@ -14,10 +14,7 @@ <===> output.css @asdf .~@#$%^&*()_-+=[]|:<>,.?/; - @asdf "f'o" 'b"r' url(baz) url("qux"); - -@asdf foo // +@asdf foo bar; - @asdf foo /* bar */ baz; diff --git a/spec/directives/import/comment.hrx b/spec/directives/import/comment.hrx index 12f05d1ba..f6d49bd9e 100644 --- a/spec/directives/import/comment.hrx +++ b/spec/directives/import/comment.hrx @@ -66,3 +66,101 @@ <===> after_comma/silent/output.css @import "a.css"; @import "b.css"; + +<===> +================================================================================ +<===> modifier/no_args/before/loud/input.scss +@import "a.css" /**/ b + +<===> modifier/no_args/before/loud/output.css +@import "a.css" b; + +<===> +================================================================================ +<===> modifier/no_args/before/silent/input.scss +@import "a.css" // + b + +<===> modifier/no_args/before/silent/output.css +@import "a.css" b; + +<===> +================================================================================ +<===> modifier/no_args/after/loud/input.scss +@import "a.css" b /**/ + +<===> modifier/no_args/after/loud/output.css +@import "a.css" b; + +<===> +================================================================================ +<===> modifier/no_args/after/silent/input.scss +@import "a.css" b // + +<===> modifier/no_args/after/silent/output.css +@import "a.css" b; + +<===> +================================================================================ +<===> modifier/args/before/loud/input.scss +@import "a.css" /**/ b(c) + +<===> modifier/args/before/loud/output.css +@import "a.css" b(c); + +<===> +================================================================================ +<===> modifier/args/before/silent/input.scss +@import "a.css" // + b(c) + +<===> modifier/args/before/silent/output.css +@import "a.css" b(c); + +<===> +================================================================================ +<===> modifier/args/after_open_paren/loud/input.scss +@import "a.css" b(/**/ c) + +<===> modifier/args/after_open_paren/loud/output.css +@import "a.css" b(/**/ c); + +<===> +================================================================================ +<===> modifier/args/after_open_paren/silent/input.scss +@import "a.css" b(c) + +<===> modifier/args/after_open_paren/silent/output.css +@import "a.css" b(c); + +<===> +================================================================================ +<===> modifier/args/before_close_paren/loud/input.scss +@import "a.css" b(c /**/) + +<===> modifier/args/before_close_paren/loud/output.css +@import "a.css" b(c /**/); + +<===> +================================================================================ +<===> modifier/args/before_close_paren/silent/input.scss +@import "a.css" b(c) + +<===> modifier/args/before_close_paren/silent/output.css +@import "a.css" b(c); + +<===> +================================================================================ +<===> modifier/args/after/loud/input.scss +@import "a.css" b(c) /**/ + +<===> modifier/args/after/loud/output.css +@import "a.css" b(c); + +<===> +================================================================================ +<===> modifier/args/after/silent/input.scss +@import "a.css" b(c) // + +<===> modifier/args/after/silent/output.css +@import "a.css" b(c); diff --git a/spec/libsass-closed-issues/issue_1263.hrx b/spec/libsass-closed-issues/issue_1263.hrx index 7e94bf167..973b25c58 100644 --- a/spec/libsass-closed-issues/issue_1263.hrx +++ b/spec/libsass-closed-issues/issue_1263.hrx @@ -9,6 +9,6 @@ foo { foo { @apply; @apply (--bar); - @apply ( --bar ); - @apply ( --bar , --foo ); + @apply ( --bar ); + @apply ( --bar , --foo ); }