Skip to content

Commit df332e0

Browse files
authored
Document the moz-document breaking change on the sass website. (#667)
* Document the moz-document breaking change on the sass website.
1 parent be437e9 commit df332e0

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

data/documentation.yml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ toc:
6565
- Media Queries Level 4: /documentation/breaking-changes/media-logic
6666
- <code>/</code> as Division: /documentation/breaking-changes/slash-div
6767
- Color Units: /documentation/breaking-changes/color-units
68+
- <code>-moz-document</code>: /documentation/breaking-changes/moz-document
6869
- Extending Compound Selectors: /documentation/breaking-changes/extend-compound
6970
- CSS Variable Syntax: /documentation/breaking-changes/css-vars
7071
- Command Line: /documentation/cli

source/documentation/breaking-changes.html.md.erb

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ These breaking changes are coming soon or have recently been released:
3535
* [Color functions are becoming more strict about
3636
units](breaking-changes/color-units) beginning in Dart Sass 1.32.0.
3737

38+
* [Parsing the special syntax of `@-moz-document` will be
39+
invalid](breaking-changes/moz-document) beginning in Dart Sass 1.7.2.
40+
3841
* [Compound selectors could not be extended](breaking-changes/extend-compound)
3942
in Dart Sass 1.0.0 and Ruby Sass 4.0.0.
4043

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Breaking Change: -moz-document"
3+
introduction: >
4+
Firefox used to have a @-moz-document rule requiring special parsing. As
5+
support is removed from Firefox, Sass is in the process of removing support
6+
for parsing them.
7+
---
8+
9+
Sass has historically supported a special parsing for the `@-moz-document` rule.
10+
As [Firefox dropped support for them], Sass will also drop support for the special
11+
parsing and will treat it as an unknown at-rule.
12+
13+
[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/
14+
15+
16+
**There is one exception**: an empty url prefix function is still allowed, as
17+
that's used in a hack targetting Firefox.
18+
19+
<% example do %>
20+
@-moz-document url-prefix() {
21+
.error {
22+
color: red;
23+
}
24+
}
25+
===
26+
@-moz-document url-prefix()
27+
.error
28+
color: red
29+
<% end %>
30+
31+
## Transition Period
32+
33+
<% impl_status dart: '1.7.2', libsass: false, ruby: false %>
34+
35+
First, we'll emit deprecation warnings for all usages of `@-moz-document`
36+
except for the empty url-prefix hack.
37+
38+
In Dart Sass 2.0, `@-moz-document` will be treated as an unknown at-rule.

0 commit comments

Comments
 (0)