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

[Firefox] Use float: inline-start/inline-end directly in MOZCENTRAL builds (PR 15968 follow-up) #16265

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

Snuffleupagus
Copy link
Collaborator

Currently float: inline-start/inline-end is only supported in Firefox, see https://developer.mozilla.org/en-US/docs/Web/CSS/float#browser_compatibility, and in order to support other browsers we're thus forced to jump through some hoops.
This leads to slightly less nice code in the built-in Firefox PDF Viewer, and this patch attempts to improve the current situation:

  • Use Stylelint to forbid direct use of float: inline-start/inline-end in the CSS files, to prevent future bugs in the general PDF.js viewer.
  • Do a build-time replacement, only in MOZCENTRAL builds, to replace the CSS-variables with raw float: inline-start/inline-end instances.

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Apr 9, 2023

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/60feb60bb998d0e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 9, 2023

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/60feb60bb998d0e/output.txt

Total script time: 1.27 mins

Published

@timvandermeij
Copy link
Contributor

r=me with a rebase; thanks!

… builds (PR 15968 follow-up)

Currently `float: inline-start/inline-end` is only supported in Firefox, see https://developer.mozilla.org/en-US/docs/Web/CSS/float#browser_compatibility, and in order to support other browsers we're thus forced to jump through some hoops.
This leads to slightly less nice code in the *built-in* Firefox PDF Viewer, and this patch attempts to improve the current situation:
 - Use Stylelint to forbid direct use of `float: inline-start/inline-end` in the CSS files, to prevent future bugs in the general PDF.js viewer.
 - Do a build-time replacement, only in MOZCENTRAL builds, to replace the CSS-variables with raw `float: inline-start/inline-end` instances.
@Snuffleupagus Snuffleupagus merged commit a431511 into mozilla:master Apr 10, 2023
@Snuffleupagus Snuffleupagus deleted the float-inline branch April 10, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants