Page MenuHomePhabricator

"Other languages" eats bottom border of page notice
Open, Needs TriagePublic

Description

Steps

Actual

The bottom border of the blue page notice is eaten by a negative shift of the "Other languages" navbar

Screenshot 2026-06-03 at 20.14.29.png (264×1 px, 59 KB)

Expected.

Screenshot 2026-06-03 at 20.14.32.png (264×1 px, 59 KB)

Other information

On most translatable pages, the layout is as follows:

  • mw-pt-translate-header: "Translate this page" (This is inserted by the extension into the skin, and has by default a grey line under it)
  • mw-content-ltr.mw-parser-output:
    • mw-pt-languages: "Other languages" (This is inserted by <languages/> markup, usually as the first thing in the content area.)

For example: https://meta.wikimedia.org/wiki/Movement_Strategy/Initiatives

Screenshot 2026-06-03 at 20.12.32.png (482×1 px, 162 KB)

If the markup were different, it would look like this, showing the grey line under "Translate this page"

Screenshot 2026-06-03 at 20.13.07.png (320×1 px, 91 KB)

This works through the below CSS rule:

.mw-pt-translate-header ~ .mw-parser-output .mw-pt-languages {
  margin-top: -1px;
}

Where this fails is when the <languages /> markup is *not* the first thing on the page. Then it ends up eating something different/unexpected.

Event Timeline

Change #1297220 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Translate@master] ext.translate.tag.languages: Limit selector to first child only

https://gerrit.wikimedia.org/r/1297220