browserstrangeness / browserstrangeness.github.io

18 stars 2 forks source link

@-moz-document limited in FF59 #5

Open WebMechanic opened 4 years ago

WebMechanic commented 4 years ago

@-moz-document has been restricted as of Firefox 59 to work only in user (profiledir/chrome/userContent.css) and UA sheets with it's various functions, url-prefix(), domain() & Co. In web pages it no longer works to check SSL or domains.

Disabled by default in web pages, except for an empty url-prefix() value, which is supported due to its use in Firefox browser detection.

It might come back as a feature for all browsers as @document in "CSS Conditional Rules Module Level 4" should that ever come to life :)

browserstrangeness commented 4 years ago

Check the test page at https://browserstrangeness.bitbucket.io/css_hacks.html (I made note of it on the individual hacks - this is valid for tracking specific versions - tested already) thanks for checking with me though

browserstrangeness commented 4 years ago

Example: @-moz-document regexp('http:.*') { .selector { property:value; } } Non-SSL Pages (Firefox 6-60)

Please notice that it actually still worked as a hack until version 60 - even with that documentation.

WebMechanic commented 4 years ago

right, my bad. It was first "flagged" in FF59, then dropped for good in FF61: https://www.fxsitecompat.dev/en-CA/docs/2018/moz-document-support-has-been-dropped-except-for-empty-url-prefix/

browserstrangeness commented 4 years ago

Interestingly enough - some things are valid hacks before or after they are documented to have effect. Not all hacks are documented at all of course (not originally) -- such being the case with more true hacks - ones that are 'found' and not programmed. It is up to people like us to document the results.