Page MenuHomePhabricator

CSS class "small" makes link text smaller than regular text
Closed, ResolvedPublic

Description

This occurs in both Vector and Monobook. When you apply the CSS "small" to text that contains a link, the link text is slightly smaller than the regular text. They should be the same size.

Test cases:

<span class="small">Blah [[Blah]]</span>

{|table class="small"

Blah [[Blah]]
}

Version: 1.17.x
Severity: minor

Details

Reference
bz28561

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:28 PM
bzimport set Reference to bz28561.

Created attachment 8407
Screenshot of the two test cases in the ticket, on English Wikipedia running 1.17wmf1 (r86086)

Attached:

blahblah.png (143×568 px, 4 KB)

This has been here for a while (looks like since r51086)

From what I can tell cause is the rule on line 1021 of screen.css:

.small, .small * {

font-size: 94%;

}

This would cause <span class="small">outer<span>inner</span></span> to have the font-size: 94% be applied to the "inner" text twice. (if there were more nested times it'd be applied even more. This goes for any tag, not just span). Solution would be to just remove the * part of that rule. What problem was that rule trying to solve?

Actually the bug predates r51086. It's found in skins/monobook/main.css as well.

Wow, no kidding. Added in r4185 (28 June 2004).

I think we should just kill the *. The behaviour does not make sense (it will also match bold tags for example), I can't imagine anyone relying on it. Or replace it with

.small, .small .small, .small .small .small {

font-size: 94%;

}

To support nested .small (what I expect is the original intent).

happy.melon.wiki wrote:

Just applying the tag to .small nests correctly on FF4 (as in, each level of nesting is smaller than the one above it). Don't know about other browsers.

(In reply to comment #5)

Just applying the tag to .small nests correctly on FF4 (as in, each level of
nesting is smaller than the one above it). Don't know about other browsers.

Right. It should on any browser that supports css nesting, i just got myself confused there.

Anyways removed the rule in r86138.