From bfda37a29d133f6af34d84dbd4343b2a872e9e21 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 4 Nov 2024 16:06:59 -0800 Subject: [PATCH] Remove `@-moz-document`-specific specs See https://github.com/sass/dart-sass/issues/378 --- spec/css/moz_document/README.md | 17 -- spec/css/moz_document/comment.hrx | 75 ------- spec/css/moz_document/empty_prefix.hrx | 32 --- .../moz_document/functions/interpolated.hrx | 197 ------------------ spec/css/moz_document/functions/static.hrx | 140 ------------- spec/css/moz_document/multi_function.hrx | 32 --- 6 files changed, 493 deletions(-) delete mode 100644 spec/css/moz_document/README.md delete mode 100644 spec/css/moz_document/comment.hrx delete mode 100644 spec/css/moz_document/empty_prefix.hrx delete mode 100644 spec/css/moz_document/functions/interpolated.hrx delete mode 100644 spec/css/moz_document/functions/static.hrx delete mode 100644 spec/css/moz_document/multi_function.hrx diff --git a/spec/css/moz_document/README.md b/spec/css/moz_document/README.md deleted file mode 100644 index f86456c5fa..0000000000 --- a/spec/css/moz_document/README.md +++ /dev/null @@ -1,17 +0,0 @@ -`@-moz-document` is a Firefox-specific at-rule that was originally based on a -draft of the [CSS Conditional Rules][] module. It's syntactically unusual in -that it defines a url-prefix() "function" that takes an unquoted URL. This can't -be parsed using Sass's normal unknown-at-rule parsing, since it may contain the -characters `//` that should not be interpreted as a single-line comment. - -[CSS Conditional Rules]: https://www.w3.org/TR/css3-conditional/ - -However, support for `@-moz-document` is [being removed from Firefox][] for -security concerns. Sass support for them should be deprecated and eventually -removed; see [issue 2529][] for details. These specs track deprecated support -for the old syntax, as well as the special case of `@-moz-document url-prefix()` -which is still supported at time of writing as a hack for targeting CSS at -Firefox only. - -[being removed from Firefox]: https://www.fxsitecompat.com/en-CA/docs/2018/moz-document-support-has-been-dropped-except-for-empty-url-prefix/ -[issue 2529]: https://github.com/sass/sass/issues/2529 diff --git a/spec/css/moz_document/comment.hrx b/spec/css/moz_document/comment.hrx deleted file mode 100644 index adee98c650..0000000000 --- a/spec/css/moz_document/comment.hrx +++ /dev/null @@ -1,75 +0,0 @@ -<===> before_arg/loud/input.scss -@-moz-document /**/ url-prefix(a) {} - -<===> before_arg/loud/output.css -@-moz-document url-prefix(a) {} - -<===> before_arg/loud/warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | @-moz-document /**/ url-prefix(a) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ' - input.scss 1:1 root stylesheet - -<===> -================================================================================ -<===> before_arg/silent/input.scss -@-moz-document // - url-prefix(a) {} - -<===> before_arg/silent/output.css -@-moz-document url-prefix(a) {} - -<===> before_arg/silent/warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | / @-moz-document // -2 | \ url-prefix(a) {} - ' - input.scss 1:1 root stylesheet - -<===> -================================================================================ -<===> after_arg/loud/input.scss -@-moz-document url-prefix(a) /**/ {} - -<===> after_arg/loud/output.css -@-moz-document url-prefix(a) {} - -<===> after_arg/loud/warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | @-moz-document url-prefix(a) /**/ {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ' - input.scss 1:1 root stylesheet - -<===> -================================================================================ -<===> after_arg/silent/input.scss -@-moz-document url-prefix(a) // - {} - -<===> after_arg/silent/output.css -@-moz-document url-prefix(a) {} - -<===> after_arg/silent/warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | / @-moz-document url-prefix(a) // -2 | \ {} - ' - input.scss 1:1 root stylesheet diff --git a/spec/css/moz_document/empty_prefix.hrx b/spec/css/moz_document/empty_prefix.hrx deleted file mode 100644 index 30330040e7..0000000000 --- a/spec/css/moz_document/empty_prefix.hrx +++ /dev/null @@ -1,32 +0,0 @@ -<===> input.scss -// An empty url-prefix() should not be deprecated yet, as it's still supported -// in Firefox's release channel at time of writing. - -@-moz-document url-prefix() { - a {b: c} -} - -@-moz-document url-prefix("") { - a {b: c} -} - -@-moz-document url-prefix('') { - a {b: c} -} - -<===> output.css -@-moz-document url-prefix() { - a { - b: c; - } -} -@-moz-document url-prefix("") { - a { - b: c; - } -} -@-moz-document url-prefix("") { - a { - b: c; - } -} diff --git a/spec/css/moz_document/functions/interpolated.hrx b/spec/css/moz_document/functions/interpolated.hrx deleted file mode 100644 index 7dbbd48b42..0000000000 --- a/spec/css/moz_document/functions/interpolated.hrx +++ /dev/null @@ -1,197 +0,0 @@ -<===> input.scss -@-moz-document url(#{"sass-lang.com"}) { - a {type: unquoted full url} -} -@-moz-document url(#{sa + ss}-lang.com) { - a {type: unquoted partial url} -} -@-moz-document url("#{sa + ss}-lang.com") { - a {type: quoted partial url} -} - -@-moz-document url-prefix(#{"https://sass-lang.com/docs"}) { - a {type: unquoted full url-prefix} -} -@-moz-document url-prefix(#{ht + tps}://sass-lang.com/docs) { - a {type: unquoted partial url-prefix} -} -@-moz-document url-prefix("#{ht + tps}://sass-lang.com/docs") { - a {type: quoted partial url-prefix} -} - -@-moz-document domain(#{"sass-lang.com"}) { - a {type: unquoted full domain} -} -@-moz-document domain(#{sa + ss}-lang.com) { - a {type: unquoted partial domain} -} -@-moz-document domain("#{sa + ss}-lang.com") { - a {type: quoted partial domain} -} - -@-moz-document regexp("#{ht + tp}s:.*") { - a {type: regexp} -} - -<===> output.css -@-moz-document url(sass-lang.com) { - a { - type: unquoted full url; - } -} -@-moz-document url(sass-lang.com) { - a { - type: unquoted partial url; - } -} -@-moz-document url("sass-lang.com") { - a { - type: quoted partial url; - } -} -@-moz-document url-prefix(https://sass-lang.com/docs) { - a { - type: unquoted full url-prefix; - } -} -@-moz-document url-prefix(https://sass-lang.com/docs) { - a { - type: unquoted partial url-prefix; - } -} -@-moz-document url-prefix("https://sass-lang.com/docs") { - a { - type: quoted partial url-prefix; - } -} -@-moz-document domain(sass-lang.com) { - a { - type: unquoted full domain; - } -} -@-moz-document domain(sass-lang.com) { - a { - type: unquoted partial domain; - } -} -@-moz-document domain("sass-lang.com") { - a { - type: quoted partial domain; - } -} -@-moz-document regexp("https:.*") { - a { - type: regexp; - } -} - -<===> warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | / @-moz-document url(#{"sass-lang.com"}) { -2 | | a {type: unquoted full url} -3 | \ } - ' - input.scss 1:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -4 | / @-moz-document url(#{sa + ss}-lang.com) { -5 | | a {type: unquoted partial url} -6 | \ } - ' - input.scss 4:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -7 | / @-moz-document url("#{sa + ss}-lang.com") { -8 | | a {type: quoted partial url} -9 | \ } - ' - input.scss 7:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -11 | / @-moz-document url-prefix(#{"https://sass-lang.com/docs"}) { -12 | | a {type: unquoted full url-prefix} -13 | \ } - ' - input.scss 11:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -14 | / @-moz-document url-prefix(#{ht + tps}://sass-lang.com/docs) { -15 | | a {type: unquoted partial url-prefix} -16 | \ } - ' - input.scss 14:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -17 | / @-moz-document url-prefix("#{ht + tps}://sass-lang.com/docs") { -18 | | a {type: quoted partial url-prefix} -19 | \ } - ' - input.scss 17:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -21 | / @-moz-document domain(#{"sass-lang.com"}) { -22 | | a {type: unquoted full domain} -23 | \ } - ' - input.scss 21:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -24 | / @-moz-document domain(#{sa + ss}-lang.com) { -25 | | a {type: unquoted partial domain} -26 | \ } - ' - input.scss 24:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -27 | / @-moz-document domain("#{sa + ss}-lang.com") { -28 | | a {type: quoted partial domain} -29 | \ } - ' - input.scss 27:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -31 | / @-moz-document regexp("#{ht + tp}s:.*") { -32 | | a {type: regexp} -33 | \ } - ' - input.scss 31:1 root stylesheet diff --git a/spec/css/moz_document/functions/static.hrx b/spec/css/moz_document/functions/static.hrx deleted file mode 100644 index 42c3c25a47..0000000000 --- a/spec/css/moz_document/functions/static.hrx +++ /dev/null @@ -1,140 +0,0 @@ -<===> input.scss -@-moz-document url(sass-lang.com) { - a {type: unquoted url} -} -@-moz-document url("sass-lang.com") { - a {type: quoted url} -} - -@-moz-document url-prefix(https://sass-lang.com/docs) { - a {type: unquoted url-prefix} -} -@-moz-document url-prefix("https://sass-lang.com/docs") { - a {type: quoted url-prefix} -} - -@-moz-document domain(sass-lang.com) { - a {type: unquoted domain} -} -@-moz-document domain("sass-lang.com") { - a {type: quoted domain} -} - -@-moz-document regexp("https:.*") { - a {type: regexp} -} - -<===> output.css -@-moz-document url(sass-lang.com) { - a { - type: unquoted url; - } -} -@-moz-document url("sass-lang.com") { - a { - type: quoted url; - } -} -@-moz-document url-prefix(https://sass-lang.com/docs) { - a { - type: unquoted url-prefix; - } -} -@-moz-document url-prefix("https://sass-lang.com/docs") { - a { - type: quoted url-prefix; - } -} -@-moz-document domain(sass-lang.com) { - a { - type: unquoted domain; - } -} -@-moz-document domain("sass-lang.com") { - a { - type: quoted domain; - } -} -@-moz-document regexp("https:.*") { - a { - type: regexp; - } -} - -<===> warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | / @-moz-document url(sass-lang.com) { -2 | | a {type: unquoted url} -3 | \ } - ' - input.scss 1:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -4 | / @-moz-document url("sass-lang.com") { -5 | | a {type: quoted url} -6 | \ } - ' - input.scss 4:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -8 | / @-moz-document url-prefix(https://sass-lang.com/docs) { -9 | | a {type: unquoted url-prefix} -10 | \ } - ' - input.scss 8:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -11 | / @-moz-document url-prefix("https://sass-lang.com/docs") { -12 | | a {type: quoted url-prefix} -13 | \ } - ' - input.scss 11:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -15 | / @-moz-document domain(sass-lang.com) { -16 | | a {type: unquoted domain} -17 | \ } - ' - input.scss 15:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -18 | / @-moz-document domain("sass-lang.com") { -19 | | a {type: quoted domain} -20 | \ } - ' - input.scss 18:1 root stylesheet - -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -22 | / @-moz-document regexp("https:.*") { -23 | | a {type: regexp} -24 | \ } - ' - input.scss 22:1 root stylesheet diff --git a/spec/css/moz_document/multi_function.hrx b/spec/css/moz_document/multi_function.hrx deleted file mode 100644 index 35da539768..0000000000 --- a/spec/css/moz_document/multi_function.hrx +++ /dev/null @@ -1,32 +0,0 @@ -<===> input.scss -@-moz-document url(http://www.w3.org/), - url-prefix(http://www.w3.org/Style/), - domain(mozilla.org), - regexp("https:.*") { - a {b: c} -} - -<===> output.css -@-moz-document url(http://www.w3.org/), - url-prefix(http://www.w3.org/Style/), - domain(mozilla.org), - regexp("https:.*") { - a { - b: c; - } -} - -<===> warning -DEPRECATION WARNING: @-moz-document is deprecated and support will be removed in Dart Sass 2.0.0. - -For details, see https://sass-lang.com/d/moz-document. - - , -1 | / @-moz-document url(http://www.w3.org/), -2 | | url-prefix(http://www.w3.org/Style/), -3 | | domain(mozilla.org), -4 | | regexp("https:.*") { -5 | | a {b: c} -6 | \ } - ' - input.scss 1:1 root stylesheet