From 6a409f4beee72a7a0ce1da8ad374ff57a7d77275 Mon Sep 17 00:00:00 2001 From: Jennifer Thakar Date: Fri, 12 Jul 2024 16:01:17 -0700 Subject: [PATCH] Migrate plain CSS tests to module system --- spec/css/plain/boolean_operations.hrx | 2 +- spec/css/plain/custom_properties.hrx | 8 +- spec/css/plain/error/expression/function.hrx | 18 +-- .../plain/error/expression/interpolation.hrx | 24 ++-- spec/css/plain/error/expression/list.hrx | 12 +- spec/css/plain/error/expression/map.hrx | 6 +- spec/css/plain/error/expression/operation.hrx | 60 ++++----- .../error/expression/parent_selector.hrx | 6 +- .../plain/error/expression/parentheses.hrx | 6 +- spec/css/plain/error/expression/variable.hrx | 12 +- spec/css/plain/error/media.hrx | 114 +++++++++--------- spec/css/plain/error/statement/at_rule.hrx | 106 ++++++++-------- .../plain/error/statement/silent_comment.hrx | 6 +- spec/css/plain/error/statement/style_rule.hrx | 36 +++--- spec/css/plain/extend.hrx | 2 +- spec/css/plain/functions.hrx | 30 ++--- spec/css/plain/hacks.hrx | 2 +- spec/css/plain/media.hrx | 26 ++-- spec/css/plain/null.hrx | 2 +- spec/css/plain/single_equals.hrx | 2 +- spec/css/plain/slash.hrx | 6 +- 21 files changed, 243 insertions(+), 243 deletions(-) diff --git a/spec/css/plain/boolean_operations.hrx b/spec/css/plain/boolean_operations.hrx index 11a64b38ad..896d9d468a 100644 --- a/spec/css/plain/boolean_operations.hrx +++ b/spec/css/plain/boolean_operations.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import "plain"; +@use "plain"; <===> plain.css a { diff --git a/spec/css/plain/custom_properties.hrx b/spec/css/plain/custom_properties.hrx index 2173495b39..bf5a7bd569 100644 --- a/spec/css/plain/custom_properties.hrx +++ b/spec/css/plain/custom_properties.hrx @@ -4,7 +4,7 @@ Regression tests for sass/dart-sass#1104. <===> ================================================================================ <===> identifier/input.scss -@import "plain"; +@use "plain"; <===> identifier/plain.css a {--b: c} @@ -17,7 +17,7 @@ a { <===> ================================================================================ <===> color/input.scss -@import "plain"; +@use "plain"; <===> color/plain.css a {--b: #ff0000} @@ -30,7 +30,7 @@ a { <===> ================================================================================ <===> nested/input.scss -@import "plain"; +@use "plain"; <===> nested/plain.css a {--b: {c: d}} @@ -43,7 +43,7 @@ a { <===> ================================================================================ <===> arbitrary_tokens/input.scss -@import "plain"; +@use "plain"; <===> arbitrary_tokens/plain.css a {--b: `~@#$%^&*()_-+={[]}|?/><} diff --git a/spec/css/plain/error/expression/function.hrx b/spec/css/plain/error/expression/function.hrx index 6293888f5f..a2569f5f12 100644 --- a/spec/css/plain/error/expression/function.hrx +++ b/spec/css/plain/error/expression/function.hrx @@ -1,5 +1,5 @@ <===> built_in/input.scss -@import 'plain' +@use 'plain' <===> built_in/plain.css a { x: index(1 2 3, 1); @@ -11,13 +11,13 @@ Error: This function isn't allowed in plain CSS. 2 | x: index(1 2 3, 1); | ^^^^^^^^^^^^^^^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> variable_arguments/input.scss -@import 'plain' +@use 'plain' <===> variable_arguments/plain.css a { x: hsl(0, 100%, 50%...); @@ -29,13 +29,13 @@ Error: expected ")". 2 | x: hsl(0, 100%, 50%...); | ^ ' - plain.css 2:22 @import - input.scss 1:9 root stylesheet + plain.css 2:22 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> keyword_arguments/input.scss -@import 'plain' +@use 'plain' <===> keyword_arguments/plain.css a { x: hsl(0, 100%, $lightness: 50%); @@ -47,5 +47,5 @@ Error: Sass variables aren't allowed in plain CSS. 2 | x: hsl(0, 100%, $lightness: 50%); | ^^^^^^^^^^ ' - plain.css 2:19 @import - input.scss 1:9 root stylesheet + plain.css 2:19 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/interpolation.hrx b/spec/css/plain/error/expression/interpolation.hrx index ac4f6fa8e8..469a2a818f 100644 --- a/spec/css/plain/error/expression/interpolation.hrx +++ b/spec/css/plain/error/expression/interpolation.hrx @@ -1,5 +1,5 @@ <===> calc/input.scss -@import 'plain' +@use 'plain' <===> calc/plain.css a { w: calc(#{1px} + 10%); @@ -11,13 +11,13 @@ Error: Interpolation isn't allowed in plain CSS. 2 | w: calc(#{1px} + 10%); | ^^^^^^ ' - plain.css 2:11 @import - input.scss 1:9 root stylesheet + plain.css 2:11 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> identifier/input.scss -@import 'plain' +@use 'plain' <===> identifier/plain.css a { w: x#{y}z; @@ -29,13 +29,13 @@ Error: Interpolation isn't allowed in plain CSS. 2 | w: x#{y}z; | ^^^^ ' - plain.css 2:7 @import - input.scss 1:9 root stylesheet + plain.css 2:7 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> quoted_string/input.scss -@import 'plain' +@use 'plain' <===> quoted_string/plain.css a { w: "x#{y}z"; @@ -47,13 +47,13 @@ Error: Interpolation isn't allowed in plain CSS. 2 | w: "x#{y}z"; | ^^^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> standalone/input.scss -@import 'plain' +@use 'plain' <===> standalone/plain.css a { w: #{x}; @@ -65,5 +65,5 @@ Error: Interpolation isn't allowed in plain CSS. 2 | w: #{x}; | ^^^^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/list.hrx b/spec/css/plain/error/expression/list.hrx index 283ce7e5c2..6a22365f88 100644 --- a/spec/css/plain/error/expression/list.hrx +++ b/spec/css/plain/error/expression/list.hrx @@ -1,5 +1,5 @@ <===> empty/input.scss -@import 'plain' +@use 'plain' <===> empty/plain.css a { x: (); @@ -11,13 +11,13 @@ Error: Expected expression. 2 | x: (); | ^ ' - plain.css 2:7 @import - input.scss 1:9 root stylesheet + plain.css 2:7 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> empty_comma/input.scss -@import 'plain' +@use 'plain' <===> empty_comma/plain.css a { x: (,); @@ -29,5 +29,5 @@ Error: Expected expression. 2 | x: (,); | ^ ' - plain.css 2:7 @import - input.scss 1:9 root stylesheet + plain.css 2:7 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/map.hrx b/spec/css/plain/error/expression/map.hrx index 3939ea085e..157e438e36 100644 --- a/spec/css/plain/error/expression/map.hrx +++ b/spec/css/plain/error/expression/map.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import 'plain' +@use 'plain' <===> plain.css a { x: (y: z); @@ -11,5 +11,5 @@ Error: expected ")". 2 | x: (y: z); | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/operation.hrx b/spec/css/plain/error/expression/operation.hrx index 06c27fbb58..2e99545f9f 100644 --- a/spec/css/plain/error/expression/operation.hrx +++ b/spec/css/plain/error/expression/operation.hrx @@ -1,5 +1,5 @@ <===> addition/input.scss -@import 'plain' +@use 'plain' <===> addition/plain.css a { x: y + z; @@ -11,13 +11,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y + z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> subtraction/input.scss -@import 'plain' +@use 'plain' <===> subtraction/plain.css a { x: y - z; @@ -29,13 +29,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y - z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> multiplication/input.scss -@import 'plain' +@use 'plain' <===> multiplication/plain.css a { x: y * z; @@ -47,13 +47,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y * z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> modulo/input.scss -@import 'plain' +@use 'plain' <===> modulo/plain.css a { x: y % z; @@ -65,13 +65,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y % z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> less_than/input.scss -@import 'plain' +@use 'plain' <===> less_than/plain.css a { x: y < z; @@ -83,13 +83,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y < z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> less_than_or_equal/input.scss -@import 'plain' +@use 'plain' <===> less_than_or_equal/plain.css a { x: y <= z; @@ -101,13 +101,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y <= z; | ^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> greater_than/input.scss -@import 'plain' +@use 'plain' <===> greater_than/plain.css a { x: y > z; @@ -119,13 +119,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y > z; | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> greater_than_or_equal/input.scss -@import 'plain' +@use 'plain' <===> greater_than_or_equal/plain.css a { x: y >= z; @@ -137,13 +137,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y >= z; | ^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> equals/input.scss -@import 'plain' +@use 'plain' <===> equals/plain.css a { x: y == z; @@ -155,13 +155,13 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y == z; | ^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> not_equals/input.scss -@import 'plain' +@use 'plain' <===> not_equals/plain.css a { x: y != z; @@ -173,5 +173,5 @@ Error: Operators aren't allowed in plain CSS. 2 | x: y != z; | ^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/parent_selector.hrx b/spec/css/plain/error/expression/parent_selector.hrx index 338be921e0..fa4be9b847 100644 --- a/spec/css/plain/error/expression/parent_selector.hrx +++ b/spec/css/plain/error/expression/parent_selector.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import 'plain' +@use 'plain' <===> plain.css a { x: &; @@ -11,5 +11,5 @@ Error: The parent selector isn't allowed in plain CSS. 2 | x: &; | ^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/parentheses.hrx b/spec/css/plain/error/expression/parentheses.hrx index 3dc81f4164..aba78126d7 100644 --- a/spec/css/plain/error/expression/parentheses.hrx +++ b/spec/css/plain/error/expression/parentheses.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import 'plain' +@use 'plain' <===> plain.css a { x: (y); @@ -11,5 +11,5 @@ Error: Parentheses aren't allowed in plain CSS. 2 | x: (y); | ^^^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/expression/variable.hrx b/spec/css/plain/error/expression/variable.hrx index 0a1876d64e..b0d0a0837d 100644 --- a/spec/css/plain/error/expression/variable.hrx +++ b/spec/css/plain/error/expression/variable.hrx @@ -1,5 +1,5 @@ <===> use/input.scss -@import 'plain' +@use 'plain' <===> use/plain.css a { x: $var; @@ -11,13 +11,13 @@ Error: Sass variables aren't allowed in plain CSS. 2 | x: $var; | ^^^^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> declaration/input.scss -@import 'plain' +@use 'plain' <===> declaration/plain.css $var: value; @@ -27,5 +27,5 @@ Error: Sass variables aren't allowed in plain CSS. 1 | $var: value; | ^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/media.hrx b/spec/css/plain/error/media.hrx index 9e2983cb15..999e910015 100644 --- a/spec/css/plain/error/media.hrx +++ b/spec/css/plain/error/media.hrx @@ -1,5 +1,5 @@ <===> logic/and_after/type_and_not/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and_after/type_and_not/plain.css @media a and not (b) and (c) {x {y: z}} @@ -10,13 +10,13 @@ Error: expected "{". 1 | @media a and not (b) and (c) {x {y: z}} | ^ ' - plain.css 1:22 @import - input.scss 1:9 root stylesheet + plain.css 1:22 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/and_after/or/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and_after/or/plain.css @media (a) or (b) and (c) {x {y: z}} @@ -27,13 +27,13 @@ Error: expected "{". 1 | @media (a) or (b) and (c) {x {y: z}} | ^ ' - plain.css 1:19 @import - input.scss 1:9 root stylesheet + plain.css 1:19 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/or_after/type/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or_after/type/plain.css @media a or (b) {x {y: z}} @@ -44,13 +44,13 @@ Error: expected "{". 1 | @media a or (b) {x {y: z}} | ^ ' - plain.css 1:13 @import - input.scss 1:9 root stylesheet + plain.css 1:13 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/or_after/type_and_not/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or_after/type_and_not/plain.css @media a and not (b) or (c) {x {y: z}} @@ -61,13 +61,13 @@ Error: expected "{". 1 | @media a and not (b) or (c) {x {y: z}} | ^ ' - plain.css 1:22 @import - input.scss 1:9 root stylesheet + plain.css 1:22 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/or_after/and/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or_after/and/plain.css @media (a) and (b) or (c) {x {y: z}} @@ -78,13 +78,13 @@ Error: expected "{". 1 | @media (a) and (b) or (c) {x {y: z}} | ^ ' - plain.css 1:20 @import - input.scss 1:9 root stylesheet + plain.css 1:20 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/or_after/type_then_and/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or_after/type_then_and/plain.css @media a and (b) or (c) {x {y: z}} @@ -95,13 +95,13 @@ Error: expected "{". 1 | @media a and (b) or (c) {x {y: z}} | ^ ' - plain.css 1:18 @import - input.scss 1:9 root stylesheet + plain.css 1:18 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/nothing_after/not/input.scss -@import 'plain'; +@use 'plain'; <===> logic/nothing_after/not/plain.css @media not {x {y: z}} @@ -112,13 +112,13 @@ Error: expected media condition in parentheses. 1 | @media not {x {y: z}} | ^ ' - plain.css 1:12 @import - input.scss 1:9 root stylesheet + plain.css 1:12 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/nothing_after/and_not/input.scss -@import 'plain'; +@use 'plain'; <===> logic/nothing_after/and_not/plain.css @media a and not {x {y: z}} @@ -129,13 +129,13 @@ Error: expected media condition in parentheses. 1 | @media a and not {x {y: z}} | ^ ' - plain.css 1:18 @import - input.scss 1:9 root stylesheet + plain.css 1:18 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/nothing_after/and/after_type/input.scss -@import 'plain'; +@use 'plain'; <===> logic/nothing_after/and/after_type/plain.css @media a and {x {y: z}} @@ -146,13 +146,13 @@ Error: expected media condition in parentheses. 1 | @media a and {x {y: z}} | ^ ' - plain.css 1:14 @import - input.scss 1:9 root stylesheet + plain.css 1:14 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/nothing_after/and/after_paren/input.scss -@import 'plain'; +@use 'plain'; <===> logic/nothing_after/and/after_paren/plain.css @media (a) and {x {y: z}} @@ -163,13 +163,13 @@ Error: expected media condition in parentheses. 1 | @media (a) and {x {y: z}} | ^ ' - plain.css 1:16 @import - input.scss 1:9 root stylesheet + plain.css 1:16 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> logic/nothing_after/or/input.scss -@import 'plain'; +@use 'plain'; <===> logic/nothing_after/or/plain.css @media (a) or {x {y: z}} @@ -180,13 +180,13 @@ Error: expected media condition in parentheses. 1 | @media (a) or {x {y: z}} | ^ ' - plain.css 1:15 @import - input.scss 1:9 root stylesheet + plain.css 1:15 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/not/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/not/plain.css @media not(a) {x {y: z}} @@ -197,13 +197,13 @@ Error: Expected whitespace. 1 | @media not(a) {x {y: z}} | ^ ' - plain.css 1:11 @import - input.scss 1:9 root stylesheet + plain.css 1:11 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/and_not/type/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/and_not/type/plain.css @media a and not(b) {x {y: z}} @@ -214,13 +214,13 @@ Error: Expected whitespace. 1 | @media a and not(b) {x {y: z}} | ^ ' - plain.css 1:17 @import - input.scss 1:9 root stylesheet + plain.css 1:17 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/and_not/type_and_modifier/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/and_not/type_and_modifier/plain.css @media only a and not(b) {x {y: z}} @@ -231,13 +231,13 @@ Error: Expected whitespace. 1 | @media only a and not(b) {x {y: z}} | ^ ' - plain.css 1:22 @import - input.scss 1:9 root stylesheet + plain.css 1:22 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/and/after_type/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/and/after_type/plain.css @media a and(b) {x {y: z}} @@ -248,13 +248,13 @@ Error: Expected whitespace. 1 | @media a and(b) {x {y: z}} | ^ ' - plain.css 1:13 @import - input.scss 1:9 root stylesheet + plain.css 1:13 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/and/first/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/and/first/plain.css @media (a) and(b) {x {y: z}} @@ -265,13 +265,13 @@ Error: Expected whitespace. 1 | @media (a) and(b) {x {y: z}} | ^ ' - plain.css 1:15 @import - input.scss 1:9 root stylesheet + plain.css 1:15 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/and/later/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/and/later/plain.css @media (a) and (b) and(c) {x {y: z}} @@ -282,13 +282,13 @@ Error: Expected whitespace. 1 | @media (a) and (b) and(c) {x {y: z}} | ^ ' - plain.css 1:23 @import - input.scss 1:9 root stylesheet + plain.css 1:23 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/or/first/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/or/first/plain.css @media (a) or(b) {x {y: z}} @@ -299,13 +299,13 @@ Error: Expected whitespace. 1 | @media (a) or(b) {x {y: z}} | ^ ' - plain.css 1:14 @import - input.scss 1:9 root stylesheet + plain.css 1:14 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> missing_whitespace/or/later/input.scss -@import 'plain'; +@use 'plain'; <===> missing_whitespace/or/later/plain.css @media (a) or (b) or(c) {x {y: z}} @@ -316,5 +316,5 @@ Error: Expected whitespace. 1 | @media (a) or (b) or(c) {x {y: z}} | ^ ' - plain.css 1:21 @import - input.scss 1:9 root stylesheet + plain.css 1:21 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/statement/at_rule.hrx b/spec/css/plain/error/statement/at_rule.hrx index 6c0287aca2..c150bc4449 100644 --- a/spec/css/plain/error/statement/at_rule.hrx +++ b/spec/css/plain/error/statement/at_rule.hrx @@ -1,5 +1,5 @@ <===> at_root/input.scss -@import 'plain' +@use 'plain' <===> at_root/plain.css a { @at-root b { @@ -13,13 +13,13 @@ Error: This at-rule isn't allowed in plain CSS. 2 | @at-root b { | ^^^^^^^^^^^ ' - plain.css 2:3 @import - input.scss 1:9 root stylesheet + plain.css 2:3 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> content/input.scss -@import 'plain' +@use 'plain' <===> content/plain.css @content; @@ -29,13 +29,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @content; | ^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> debug/input.scss -@import 'plain' +@use 'plain' <===> debug/plain.css @debug foo; @@ -45,13 +45,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @debug foo; | ^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> each/input.scss -@import 'plain' +@use 'plain' <===> each/plain.css @each $i in 1 2 3 { a { @@ -65,13 +65,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @each $i in 1 2 3 { | ^^^^^^^^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> error/input.scss -@import 'plain' +@use 'plain' <===> error/plain.css @error foo; @@ -81,13 +81,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @error foo; | ^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> extend/input.scss -@import 'plain' +@use 'plain' <===> extend/plain.css a { @extend b; @@ -99,13 +99,13 @@ Error: This at-rule isn't allowed in plain CSS. 2 | @extend b; | ^^^^^^^^^ ' - plain.css 2:3 @import - input.scss 1:9 root stylesheet + plain.css 2:3 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> for/input.scss -@import 'plain' +@use 'plain' <===> for/plain.css @for $i from 1 to 5 { a { @@ -119,13 +119,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @for $i from 1 to 5 { | ^^^^^^^^^^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> function/input.scss -@import 'plain' +@use 'plain' <===> function/plain.css @function foo() { @return 1; @@ -137,13 +137,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @function foo() { | ^^^^^^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> if/input.scss -@import 'plain' +@use 'plain' <===> if/plain.css @if true { a { @@ -157,13 +157,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @if true { | ^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> import/interpolated/input.scss -@import 'plain' +@use 'plain' <===> import/interpolated/plain.css @import url("foo#{bar}baz"); @@ -173,13 +173,13 @@ Error: Interpolation isn't allowed in plain CSS. 1 | @import url("foo#{bar}baz"); | ^^^^^^ ' - plain.css 1:17 @import - input.scss 1:9 root stylesheet + plain.css 1:17 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> import/nested/input.scss -@import 'plain' +@use 'plain' <===> import/nested/plain.css a { @import "foo"; @@ -193,7 +193,7 @@ a { <===> ================================================================================ <===> import/multi/input.scss -@import 'plain' +@use 'plain' <===> import/multi/plain.css @import "foo", "bar"; @@ -203,13 +203,13 @@ Error: expected ";". 1 | @import "foo", "bar"; | ^ ' - plain.css 1:14 @import - input.scss 1:9 root stylesheet + plain.css 1:14 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> include/input.scss -@import 'plain' +@use 'plain' <===> include/plain.css @include foo; @@ -219,18 +219,18 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @include foo; | ^^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> mixin/input.scss -@import 'plain' +@use 'plain' <===> mixin/plain.css @mixin foo { a { x: y; - } + } } <===> mixin/error @@ -239,13 +239,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @mixin foo { | ^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> return/input.scss -@import 'plain' +@use 'plain' <===> return/plain.css @return foo; @@ -255,13 +255,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @return foo; | ^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> warn/input.scss -@import 'plain' +@use 'plain' <===> warn/plain.css @warn foo; @@ -271,13 +271,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @warn foo; | ^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> while/input.scss -@import 'plain' +@use 'plain' <===> while/plain.css @while false { a { @@ -291,13 +291,13 @@ Error: This at-rule isn't allowed in plain CSS. 1 | @while false { | ^^^^^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> interpolation/input.scss -@import 'plain' +@use 'plain' <===> interpolation/plain.css @foo a#{b}c; @@ -307,5 +307,5 @@ Error: Interpolation isn't allowed in plain CSS. 1 | @foo a#{b}c; | ^^^^ ' - plain.css 1:7 @import - input.scss 1:9 root stylesheet + plain.css 1:7 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/statement/silent_comment.hrx b/spec/css/plain/error/statement/silent_comment.hrx index 6c852fccaf..ddfde96cb9 100644 --- a/spec/css/plain/error/statement/silent_comment.hrx +++ b/spec/css/plain/error/statement/silent_comment.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import 'plain' +@use 'plain' <===> plain.css // silent @@ -10,5 +10,5 @@ Error: Silent comments aren't allowed in plain CSS. 1 | // silent | ^^^^^^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/error/statement/style_rule.hrx b/spec/css/plain/error/statement/style_rule.hrx index e6e4815259..89a50f02fd 100644 --- a/spec/css/plain/error/statement/style_rule.hrx +++ b/spec/css/plain/error/statement/style_rule.hrx @@ -1,5 +1,5 @@ <===> nested_property/no_value/input.scss -@import 'plain' +@use 'plain' <===> nested_property/no_value/plain.css a { x: { @@ -13,13 +13,13 @@ Error: Nested declarations aren't allowed in plain CSS. 2 | x: { | ^ ' - plain.css 2:6 @import - input.scss 1:9 root stylesheet + plain.css 2:6 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> nested_property/value/input.scss -@import 'plain' +@use 'plain' <===> nested_property/value/plain.css a { @@ -34,8 +34,8 @@ Error: Nested declarations aren't allowed in plain CSS. 2 | b: c { | ^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet <===> ================================================================================ @@ -144,7 +144,7 @@ Error: Top-level leading combinators aren't allowed in plain CSS. <===> ================================================================================ <===> placeholder_selector/input.scss -@import 'plain' +@use 'plain' <===> placeholder_selector/plain.css %foo { x: y; @@ -156,13 +156,13 @@ Error: Placeholder selectors aren't allowed in plain CSS. 1 | %foo { | ^^^^ ' - plain.css 1:1 @import - input.scss 1:9 root stylesheet + plain.css 1:1 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> interpolation/selector/input.scss -@import 'plain' +@use 'plain' <===> interpolation/selector/plain.css a#{b}c { x: y; @@ -174,13 +174,13 @@ Error: Interpolation isn't allowed in plain CSS. 1 | a#{b}c { | ^^^^ ' - plain.css 1:2 @import - input.scss 1:9 root stylesheet + plain.css 1:2 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> interpolation/declaration/input.scss -@import 'plain' +@use 'plain' <===> interpolation/declaration/plain.css a { w#{x}y: z; @@ -192,13 +192,13 @@ Error: Interpolation isn't allowed in plain CSS. 2 | w#{x}y: z; | ^^^^ ' - plain.css 2:4 @import - input.scss 1:9 root stylesheet + plain.css 2:4 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> interpolation/custom_property/input.scss -@import 'plain' +@use 'plain' <===> interpolation/custom_property/plain.css a { --b: #{c}; @@ -210,5 +210,5 @@ Error: Interpolation isn't allowed in plain CSS. 2 | --b: #{c}; | ^^^^ ' - plain.css 2:8 @import - input.scss 1:9 root stylesheet + plain.css 2:8 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/extend.hrx b/spec/css/plain/extend.hrx index ee30a3a8eb..eee3a9b09a 100644 --- a/spec/css/plain/extend.hrx +++ b/spec/css/plain/extend.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import "plain"; +@use "plain"; a {@extend b} diff --git a/spec/css/plain/functions.hrx b/spec/css/plain/functions.hrx index 75f2c4faa4..e779334323 100644 --- a/spec/css/plain/functions.hrx +++ b/spec/css/plain/functions.hrx @@ -14,7 +14,7 @@ c { <===> ================================================================================ <===> hsl/input.scss -@import "plain"; +@use "plain"; <===> hsl/plain.css a {b: hsl(0, 100%, 50%)} @@ -27,7 +27,7 @@ a { <===> ================================================================================ <===> hsla/input.scss -@import "plain"; +@use "plain"; <===> hsla/plain.css a {b: hsla(0, 100%, 50%, 0.5)} @@ -40,7 +40,7 @@ a { <===> ================================================================================ <===> rgb/input.scss -@import "plain"; +@use "plain"; <===> rgb/plain.css a {b: rgb(10, 20, 30)} @@ -53,7 +53,7 @@ a { <===> ================================================================================ <===> rgba/input.scss -@import "plain"; +@use "plain"; <===> rgba/plain.css a {b: rgba(10, 20, 30, 0.5)} @@ -66,7 +66,7 @@ a { <===> ================================================================================ <===> grayscale/input.scss -@import "plain"; +@use "plain"; <===> grayscale/plain.css a {b: grayscale(0.1)} @@ -79,7 +79,7 @@ a { <===> ================================================================================ <===> invert/input.scss -@import "plain"; +@use "plain"; <===> invert/plain.css a {b: invert(0.1)} @@ -92,7 +92,7 @@ a { <===> ================================================================================ <===> alpha/input.scss -@import "plain"; +@use "plain"; <===> alpha/plain.css a {b: alpha(0.1)} @@ -105,7 +105,7 @@ a { <===> ================================================================================ <===> saturate/input.scss -@import "plain"; +@use "plain"; <===> saturate/plain.css a {b: saturate(0.1)} @@ -118,7 +118,7 @@ a { <===> ================================================================================ <===> empty_fallback_var/input.scss -@import "plain"; +@use "plain"; <===> empty_fallback_var/plain.css a {b: var(--c, )} @@ -131,7 +131,7 @@ a { <===> ================================================================================ <===> error/empty_fallback_var/invalid_second_arg_syntax/input.scss -@import "plain"; +@use "plain"; <===> error/empty_fallback_var/invalid_second_arg_syntax/plain.css a {b: var(--c, {})} @@ -142,13 +142,13 @@ Error: Expected expression. 1 | a {b: var(--c, {})} | ^ ' - plain.css 1:16 @import - input.scss 1:9 root stylesheet + plain.css 1:16 @use + input.scss 1:1 root stylesheet <===> ================================================================================ <===> error/empty_fallback_var/empty_second_before_third/input.scss -@import "plain"; +@use "plain"; <===> error/empty_fallback_var/empty_second_before_third/plain.css a {b: var(--c, , d)} @@ -159,5 +159,5 @@ Error: Expected expression. 1 | a {b: var(--c, , d)} | ^ ' - plain.css 1:16 @import - input.scss 1:9 root stylesheet + plain.css 1:16 @use + input.scss 1:1 root stylesheet diff --git a/spec/css/plain/hacks.hrx b/spec/css/plain/hacks.hrx index e8e5be66fd..4525cb059e 100644 --- a/spec/css/plain/hacks.hrx +++ b/spec/css/plain/hacks.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import "plain"; +@use "plain"; <===> plain.css .hacks { diff --git a/spec/css/plain/media.hrx b/spec/css/plain/media.hrx index a711c3f2b8..a15d9c03e3 100644 --- a/spec/css/plain/media.hrx +++ b/spec/css/plain/media.hrx @@ -1,5 +1,5 @@ <===> logic/and_not/lowercase/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and_not/lowercase/plain.css @media a and not (b) {x {y: z}} @@ -14,7 +14,7 @@ <===> ================================================================================ <===> logic/and_not/mixed_case/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and_not/mixed_case/plain.css @media a AnD nOt (b) {x {y: z}} @@ -29,7 +29,7 @@ <===> ================================================================================ <===> logic/and_not/after_type_and_modifier/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and_not/after_type_and_modifier/plain.css @media only a and not (b) {x {y: z}} @@ -44,7 +44,7 @@ <===> ================================================================================ <===> logic/and/one/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and/one/plain.css @media (a) and (b) {x {y: z}} @@ -59,7 +59,7 @@ <===> ================================================================================ <===> logic/and/no_whitespace_before/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and/no_whitespace_before/plain.css @media (a)and (b) {x {y: z}} @@ -74,7 +74,7 @@ <===> ================================================================================ <===> logic/and/multiple/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and/multiple/plain.css @media (a) and (b) and (c) and (d) {x {y: z}} @@ -89,7 +89,7 @@ <===> ================================================================================ <===> logic/and/mixed_case/input.scss -@import 'plain'; +@use 'plain'; <===> logic/and/mixed_case/plain.css @media (a) AnD (b) {x {y: z}} @@ -104,7 +104,7 @@ <===> ================================================================================ <===> logic/or/one/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or/one/plain.css @media (a) or (b) {x {y: z}} @@ -119,7 +119,7 @@ <===> ================================================================================ <===> logic/or/no_whitespace_before/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or/no_whitespace_before/plain.css @media (a)or (b) {x {y: z}} @@ -134,7 +134,7 @@ <===> ================================================================================ <===> logic/or/multiple/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or/multiple/plain.css @media (a) or (b) or (c) or (d) {x {y: z}} @@ -149,7 +149,7 @@ <===> ================================================================================ <===> logic/or/mixed_case/input.scss -@import 'plain'; +@use 'plain'; <===> logic/or/mixed_case/plain.css @media (a) oR (b) {x {y: z}} @@ -164,7 +164,7 @@ <===> ================================================================================ <===> logic/not/lowercase/input.scss -@import 'plain'; +@use 'plain'; <===> logic/not/lowercase/plain.css @media not (a) {x {y: z}} @@ -179,7 +179,7 @@ <===> ================================================================================ <===> logic/not/mixed_case/input.scss -@import 'plain'; +@use 'plain'; <===> logic/not/mixed_case/plain.css @media NoT (a) {x {y: z}} diff --git a/spec/css/plain/null.hrx b/spec/css/plain/null.hrx index 8f40e329b5..32c1f20782 100644 --- a/spec/css/plain/null.hrx +++ b/spec/css/plain/null.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import "plain"; +@use "plain"; <===> plain.css a { diff --git a/spec/css/plain/single_equals.hrx b/spec/css/plain/single_equals.hrx index 6823adac04..5d82612ed3 100644 --- a/spec/css/plain/single_equals.hrx +++ b/spec/css/plain/single_equals.hrx @@ -1,5 +1,5 @@ <===> input.scss -@import "plain"; +@use "plain"; <===> plain.css a { diff --git a/spec/css/plain/slash.hrx b/spec/css/plain/slash.hrx index 3e8516c1a6..c9442756a8 100644 --- a/spec/css/plain/slash.hrx +++ b/spec/css/plain/slash.hrx @@ -1,5 +1,5 @@ <===> with_intermediate/input.scss -@import "plain"; +@use "plain"; <===> with_intermediate/plain.css a {b: 1/2/foo/bar} @@ -12,7 +12,7 @@ a { <===> ================================================================================ <===> without_intermediate/whitespace/input.scss -@import "plain"; +@use "plain"; <===> without_intermediate/whitespace/plain.css a {b: 1/ / /bar} @@ -25,7 +25,7 @@ a { <===> ================================================================================ <===> without_intermediate/no_whitespace/input.scss -@import "plain"; +@use "plain"; <===> without_intermediate/no_whitespace/plain.css a {b: 1///bar}