Page MenuHomePhabricator

ULS: Don't set inline "font-family: sans-serif" when no fonts are specified
Closed, ResolvedPublic

Description

At http://tieteentermipankki.fi/wiki the ULS is overriding the font Georgia specified for #bodyContent with generic sans-serif font, even when no webfonts are used or available.


Version: master
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=54453

Details

Reference
bz39992

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:03 AM
bzimport set Reference to bz39992.

When I navigate to https://translatewiki.net/w/i.php?title=Special:UserLogin

I always get this annoying tiny font in the username input field because ULS is setting inline style="font-family: sans-serif;" on the input field.

See also bug 39560. This is currently occurring on Wikidata.org.

By default users now have "font-family: sans-serif;" inline on the <textarea>
instead of the browser default (which in most browsers is a monospace font for
<textarea>).

Also happening on sa.wikisource.org.

For example: https://sa.wikisource.org/w/index.php?title=MediaWiki:Gadget-AjaxPatrolLinks.js&action=edit

My default is a monospace font, but on that page I get a sans-serif font. Even if I press "Reset" it'll still enforce an inline style sans-serif.

It should reset it, not enforce it to sans-serif.

Krinkle: If it is happening on sa.wikisource.org it must be the WebFonts extension, not ULS.

I lost track what is what, it seems to be migrating from one to another. AFAIK they are based on the same code. The bug is in both.

Patch Set 2: There's a problem with this change, please improve
Claims to fix bug 39992 but it doesn't, unless you specifically disable all webfont loading and refresh the page.

Retested this. If the user has an 'editfont' preference, we will exclude the editable areas from applying webfont. Also, if the user preference is 'system' for the current UI language, we will exclude.

There is a bug when resetting the font to system, instead of leaving the textarea untouched, currently it set sans-serif font explicitly.- to be fixed.

(In reply to comment #9)

There is a bug when resetting the font to system, instead of leaving the
textarea untouched, currently it set sans-serif font explicitly.- to be
fixed.

Ic3baa18b01a972f08e51e84217e82d0939e674c0 and Iff522e0016d8284dc785580e6eb3dd2967c58289 will address this.

I see style="font-family: sans-serif;" on body now.

sans-serif is the default font-family value for body, even if ULS extension is not used.

Yes, but with ULS it is appearing as inline-style which overrides other defined styles.

Related URL: https://gerrit.wikimedia.org/r/66084 (Gerrit Change Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0)