Page MenuHomePhabricator

"edit" link for page lead shows in different font in Vector skin
Closed, ResolvedPublic

Description

I have the gadget called "Add an [edit] link for the lead section of a page" enabled on en.WP, and have done for as long as I can remember. Just in the last couple of days, probably since Thursday, the "edit" link for the lead section shows in a different font from the "edit" links for all of the other sections on the page. This is happening in every namespace, as far as I can tell.

Another editor writes: I see serif in Vector but sans-serif in Cologne Blue, Modern and MonoBook. The gadget code is in MediaWiki:Gadget-edittop.js and MediaWiki:Gadget-edittop.css.

Another editor confirms: Not just you, this also changed for me in the last couple of days.

The lead section's edit link should show in the same font and size as the rest of the edit links on the page.

Event Timeline

Can confirm. Someone has recently made the selector unnecessarily specific. The relevant CSS rule is currently

.mw-body-content .mw-editsection,
.mw-body-content .mw-editsection-like {
	font-family: sans-serif;
}

The ".mw-body-content " part is completely uncalled for and needs to be removed.

This was rSVEC24802a3aafb1cb3d6145706b478ae860da10cc2a. It's not apparent why the editsection styles were included in that change.

It's not apparent why the editsection styles were included in that change.

Everything in mw-body was migrated to mw-body-content. In the skin edit sections always appear in mw-body-content, but this on-wiki gadget violates that rule. Previously it was okay because section 0 is still inside mw-body. As there would unlikely be any harm in un-parenting the selector we can just do that.

Change 342326 had a related patch set uploaded (by Esanders):
[mediawiki/skins/Vector] Allow edit sections outside of mw-body-content

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

Change 342326 merged by jenkins-bot:
[mediawiki/skins/Vector] Allow edit sections outside of mw-body-content

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

matmarex assigned this task to Esanders.
matmarex removed a project: Patch-For-Review.

Thanks for filing the bug. The issue has been fixed, and the fix will be deployed to Wikimedia wikis next week, 14-16 March, per https://www.mediawiki.org/wiki/MediaWiki_1.29/Roadmap.