question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Admonition bleeding out with extra pixels in Firefox

See original GitHub issue

Contribution guidelines

I’ve found a bug and checked that …

  • … the problem doesn’t occur with the mkdocs or readthedocs themes
  • … the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_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):

Firefox-mkdocs-boxes

This does not happen with Google Chrome nor Chromium Linux:

Chrome-mkdocs-boxes

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: Chrome-mkdocs-boxes

Actual behaviour

There are extra pixels in the border of the title area: Firefox-mkdocs-boxes

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:closed
  • Created a year ago
  • Reactions:1
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
squidfunkcommented, Mar 30, 2022

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.

1reaction
facelessusercommented, Apr 4, 2022

Bah… Thanks for the heads up 😃.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found