Currently, in 8.6.x there are 4 instances of @-moz-document url-prefix() {} being used to supply Firefox only css. However, as of June 26th, 2018, with the release of Firefox 61, that rule will no longer be supported. Already, unsupported in dev/nightly/beta, which is why I noticed it since #2886904: display: block for details/summary hides drop arrows in Firefox (normalize.css update) didn't work. The reasons for removal are security/CSS injection/exfiltration.
Three of the instances, are related to a fieldset width Firefox bug that was fixed over 2 years ago. These should probably be removed when #2390621: [policy, no patch] Update Drupal's browser support policy is finally resolved.
Suggested Fix
According to http://browserhacks.com, using @media(min--moz-device-pixel-ratio:0) {} works in all Firefox versions >=4 and matches Drupal's current browser support.
Testing
Testing the change related to #2886904: display: block for details/summary hides drop arrows in Firefox (normalize.css update) is easy:
- Using Firefox 61 (or a beta/dev release since 59)
- Confirm layout.css.moz-document.url-prefix-hack.enabled is disabled in about:config
- Navigate to admin/config/system/site-information
- Confirm that the arrow shows on the summary/details element and toggles on opening/closing the element.
Functional testing the changes related to fieldset width would require a very old Firefox version and I believe it can be skipped as long as a code review shows the changes are equivalent.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2975388-8-after.png | 76.91 KB | idebr |
| #9 | 2975388-8-before.png | 78.25 KB | idebr |
| #8 | 2975388-firefox-moz-document-8.patch | 1.66 KB | nickdickinsonwilde |
Comments
Comment #2
nickdickinsonwildePatch making changes detailed above.
Ideally, #2886904: display: block for details/summary hides drop arrows in Firefox (normalize.css update) would be cherry picked to 8.5.x and so would this. However, unless #2886904: display: block for details/summary hides drop arrows in Firefox (normalize.css update) is cherrypicked, this does not apply to 8.5.x.
Comment #3
idebr commentedI suppose we can just pick any selector hack from http://browserhacks.com?
Personally I find the code be easier to scan if the selector hack takes its own line, for example:
This can be replaced with:
Comment #4
nickdickinsonwildeYeah any selector hack that works with Firefox 5.x and up would work.
Comment #6
nickdickinsonwildeBah! .... https://www.fxsitecompat.com/en-CA/docs/2018/moz-tree-pseudo-elements-ha...
My patch no longer works for Nightly/beta and soon won't work for release branch.
Using a separate line selector hack @idebr if you wanted to re-review that?
Comment #7
idebr commentedThese lines have a trailing space.
This selector was not updated in line with the other Firefox css selectors.
Comment #8
nickdickinsonwildeer that's weird.... fixed
Comment #9
idebr commented- Updated the issue summary "Suggested fix" with the new Firefox selector and a reference to browserhacks.com
- Tested the fix in Firefox 62 (stable) with layout.css.moz-document.url-prefix-hack.enabled disabled in about:config, see https://bugzilla.mozilla.org/show_bug.cgi?id=1449753
Before:

After:
Comment #10
alexpottDiscussed with @lauriii and we agreed this is a good bugfix and doesn't have any BC concerns.
Committed and pushed 3c15e75d32 to 8.7.x and 996c3f9109 to 8.6.x. Thanks!
There were some CSS coding style things to fix on commit.