Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop explicit support for @-moz-document #378

Open
3 of 6 tasks
Tracked by #2529
nex3 opened this issue Jun 22, 2018 · 6 comments
Open
3 of 6 tasks
Tracked by #2529

Drop explicit support for @-moz-document #378

nex3 opened this issue Jun 22, 2018 · 6 comments
Milestone

Comments

@nex3
Copy link
Contributor

nex3 commented Jun 22, 2018

See sass/sass#2529.

@refi64
Copy link

refi64 commented Jul 21, 2019

Isn't @-moz-document is still used for userstyles? I could try migrating to url-prefix, but afaik userstyle support is still entirely present and not deprecated.

@nex3
Copy link
Contributor Author

nex3 commented Jul 22, 2019

@refi64 Can you use @document there instead? One reason we want to drop support for @-moz-document is that it uses different syntax than @document, which requires special parser support.

@refi64
Copy link

refi64 commented Jul 23, 2019

Ah apologies, I didn't realize @document worked as well.

@nex3 nex3 added this to the 2.0.0 milestone Jun 27, 2022
@stof
Copy link
Contributor

stof commented Sep 3, 2022

@nex3 given that Firefox gave up on removing support for the empty prefix hack (see https://bugzilla.mozilla.org/show_bug.cgi?id=1449753#c17), what is the plan for Sass ?

@nex3
Copy link
Contributor Author

nex3 commented Sep 6, 2022

Dang. In that case, I think what we should do is transition to treating @-moz-document like an unknown at-rule: parse its value as an interpolated declaration value and be done with it. That probably isn't even a breaking change, since only interpolated SassScript is allowed in the first place. I'll update the task list above.

@nex3 nex3 changed the title Drop support for @-moz-document Drop explicit support for @-moz-document Sep 6, 2022
@Rhys-T
Copy link

Rhys-T commented Dec 22, 2022

Firefox still allows @-moz-document rules with values other than url-prefix() in its user stylesheet files (userChrome.css and userContent.css), as well as the browser's own internal stylesheets. (Changing them to unprefixed @documents did not seem to work, and according to MDN, even Firefox only supports the prefixed version.) They're also used in the UserCSS format used by the Stylus user stylesheet manager1 and similar browser extensions. (In that case, they're being interpreted by the extension rather than the browser engine - which might not even be Firefox - but the spec still says to use the -moz--prefixed version.)

[Edit: Just realized that user styles were mentioned above as supporting @document, and I somehow missed it. Still, userChrome.css and userContent.css do seem to need the prefixed version.]

Would it be feasible to limit the deprecation warning to forms of @-moz-document that are actually syntactically invalid according to the spec, and thus might fail when the explicit parser support is removed from Sass? If I understand correctly, that would be cases where url-prefix or domain has an unquoted argument - and they work just as well with quoted ones.

Footnotes

  1. Not to be confused with the CSS preprocessor also named Stylus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants