sass-site/source/documentation/breaking-changes/moz-document.liquid

42 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-05-25 01:33:39 +02:00
---
2023-05-26 00:24:38 +02:00
title: 'Breaking Change: -moz-document'
2023-05-25 01:33:39 +02:00
introduction: >
Firefox used to have a @-moz-document rule requiring special parsing. As
support is removed from Firefox, Sass is in the process of removing support
for parsing them.
---
2023-05-26 20:32:08 +02:00
{% markdown %}
2023-05-31 18:02:42 +02:00
Sass has historically supported a special parsing for the `@-moz-document`
rule. As [Firefox dropped support for them], Sass will also drop support for
the special parsing and will treat it as an unknown at-rule.
2023-05-25 01:33:39 +02:00
2023-05-31 18:02:42 +02:00
[Firefox dropped support for them]: https://web.archive.org/web/20200528221656/https://www.fxsitecompat.dev/en-CA/docs/2018/moz-document-support-has-been-dropped-except-for-empty-url-prefix/
2023-05-25 01:33:39 +02:00
2023-05-31 18:02:42 +02:00
**There is one exception**: an empty url prefix function is still allowed, as
that's used in a hack targetting Firefox.
2023-05-26 20:32:08 +02:00
{% endmarkdown %}
2023-05-25 01:33:39 +02:00
2023-05-26 20:32:08 +02:00
{% codeExample 'moz-document' %}
2023-05-31 18:02:42 +02:00
@-moz-document url-prefix() {
.error {
color: red;
}
2023-05-25 01:33:39 +02:00
}
2023-05-31 18:02:42 +02:00
===
@-moz-document url-prefix()
.error
color: red
2023-05-25 01:33:39 +02:00
{% endcodeExample %}
2023-05-26 20:32:08 +02:00
{% markdown %}
2023-05-31 18:02:42 +02:00
## Transition Period
2023-05-25 01:33:39 +02:00
2023-06-01 22:56:54 +02:00
{% compatibility 'dart: "1.7.2"', 'libsass: false', 'ruby: false' %}{% endcompatibility %}
2023-05-25 01:33:39 +02:00
2023-05-31 18:02:42 +02:00
First, we'll emit deprecation warnings for all usages of `@-moz-document`
except for the empty url-prefix hack.
2023-05-25 01:33:39 +02:00
2023-05-31 18:02:42 +02:00
In Dart Sass 2.0, `@-moz-document` will be treated as an unknown at-rule.
2023-05-26 20:32:08 +02:00
{% endmarkdown %}