Admonition bleeding out with extra pixels in Firefox
See original GitHub issueContribution guidelines
- I’ve read the contribution guidelines and wholeheartedly agree
I’ve found a bug and checked that …
- … the problem doesn’t occur with the
mkdocs
orreadthedocs
themes - … the problem persists when all overrides are removed, i.e.
custom_dir
,extra_javascript
andextra_css
- … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
There are some extra pixels on the border of admonition boxes on Firefox (98.0.2) Linux (Ubuntu 20.04LTS):
This does not happen with Google Chrome nor Chromium Linux:
Also, this seems to only affects Firefox on Linux, it does not occur on Windows (other OSes not tested).
Expected behaviour
There shouldn’t be any extra pixels:
Actual behaviour
There are extra pixels in the border of the title area:
Steps to reproduce
Use Firefox 98.0.2 on Ubuntu 20.04LTS and go to https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=admoni#supported-types
Package versions
- Python: 3.8.10
- MkDocs: 1.2.3
- Material: 8.2.5
Configuration
site_name: Material for MkDocs
site_url: https://squidfunk.github.io/mkdocs-material/
System information
- Operating system: Ubuntu 20.04LTS
- Browser: Firefox 98.0.2
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Website panels bleeding into each other - not on other browsers
I've attached and example. The web-site is www.itsmf.org.za. When I look at it on Safari, or Chrome, or Opera, it is fine, but...
Read more >The display area in Firefox suddenly becomes scrambled with ...
Chosen solution Then perform these steps: Click the orange Firefox button at the top left, then select the "Options" button, or, if there...
Read more >images bleeding to other images | Firefox Support Forum
Open Firefox Options window as follows:click the menu button New Fx Menu · In the Firefox Options window, click the Advanced tab, then...
Read more >1614218 - Maximized window titlebar bleeds into bottom of ...
The firefox window bleeds into the top monitor by 6 pixels. ... Attached image firefox bleeding on another monitor — Details.
Read more >Changelog - Yordam sahifasi
Added support for GitHub-style hash fragments for dark/light images ... Fixed #3782: Admonition titles have extra pixels on wide screens in Firefox ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think I have a fix in c5a06c1d8. The problem comes from rounding errors and the negative margins we use to position the admonition title – Firefox seems to employ a different rounding method than other browsers, which leads to the admonition bleeding out. It doesn’t seem to happen in Chrome or Safari.
I added a browser hack that targets Firefox explicitly (I think the first browser-specific hack in the whole codebase), and adjusted the margin. My testing shows that it works. I’ve also checked right-to-left layouts, which also seem to work.
Bah… Thanks for the heads up 😃.