arrow-down arrow at-sign bug check checkbox-checked checkbox-unchecked svg-checkmark chevron-right chevrons-right circle-down circle-left circle-right circle-up cloud2 svg-cross2 download download external-link filter github hash home leaf leaf left link-2 log-in log-out mail menu message-square minus plus radio-checked radio-checked2 radio-unchecked search settings spinner8 target twitter up upload-2 user users warning x zap
  • Home
  • Report a bug
  • Contribute
  • All issues
  • Login

URL: https://jsfiddle.net/vwLso5b8/8/

Browser / Version: Firefox 128.0
Operating System: Windows 10
Tested Another Browser: Yes Chrome

Problem type: Design is broken
Description: Items are misaligned
Steps to Reproduce:
It is my understanding that span tags should be layout-neutral. However, on Firefox the use of span tags inside another element (including inline elements) sometimes changes formatting when "text-align: justify" is used. In the JS Fiddle linked, the text content of the two divs are identical. However, justification is different.

The glitch can be hard to reproduce because text justification is only inconsistent at certain widths. In this example, in my local browser, setting the container to 410px did it. However, if the problem is not apparent, just remove the fixed width and drag to resize the window for a bit and it'll eventually pop up.

It's also hard to pinpoint what's wrong because changing CSS (font-size, white-space, word-break, font-kerning etc.) will seemingly fix it. However, you'll soon realize that it's not really fixed, it's just that the text has repositioned and will now break at a different width. Nothing that I tried solved it definitively, although sometimes it took longer for the problem to manifest.

I suspect it's something in the text justification algorithm.

View the screenshot Screenshot
Browser Configuration
  • None

From webcompat.com with ❤️

Please login to edit issues.

View issue on Github

Shortcut: Press l on your keyboard to open the label editor. Shortcut: Press g on your keyboard to be taken to the GitHub view of this page.
Closed: Moved
#139946

jsfiddle.net - Items are misaligned

Opened: 2024-08-04
Reporter: rframil
Comments: 1
  • Home
  • List of issues
  • About
  • Contribute
  • Contact
  • Privacy Policy
  • Terms of Service
  • Code of Conduct