Page MenuHomePhabricator

Several problems with styles for thumbnails (thumb) in PageCSS
Closed, ResolvedPublic

Description

Author: loustyx

Description:

There is many (injustified) differences between screen and printer preview and
printer preview generates awful borders. So class "thumb" can't be used by templates such that

http://fr.wikipedia.org/wiki/Mod%C3%A8le:D%C3%A9but_d%27illustration

and

http://fr.wikipedia.org/wiki/Mod%C3%A8le:Encadr%C3%A9_texte.

There certainly is changes in http://fr.wikipedia.org/skins-1.5/monobook/main.css
(http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/skins/monobook/main.css)
that has not been reported in http://fr.wikipedia.org/skins-1.5/common/commonPrint.css
(http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/skins/common/commonPrint.css)

I think, main.css should be copied in commonPrint.css.

Futhermore, this style

div.thumb {
border-color: White;
}

should be replaced by

div.thumb {
border-color: transparent;
}

It's a good idea to add

.thumbimage { background:white; }

directly in main.css.

used "border" instead of "margin" is a bad thing. I don't the reason why ; but I'm sure it's a bad one.

more generally, CSS code is very poor (too large scopes, too many stuff). I think a clean up is necessary.


Version: unspecified
Severity: trivial
URL: http://fr.wikipedia.org/wiki/Discussion_Mod%C3%A8le:D%C3%A9but_d%27illustration

Details

Reference
bz16272

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 10:23 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz16272.
bzimport added a subscriber: Unknown Object (MLST).

I think it uses border and color:white to prevent the h2 line from connecting to the image. It indeed is somewhat of "bad reason", but it does work.

chinchi29 wrote:

Bug 8814 might be related.

1: was done a while ago during the vector work.
2 and 4: part of Bug 8814
3: I suggest we retool this ticket for this specific issue, or we open a separate ticket for it.
5: Too broad an issue.

The scope of this bug is indeed to broad.

The border to margin has been fixed in r79086.

(In reply to comment #1)

I think it uses border and color:white to prevent the h2 line from connecting
to the image. It indeed is somewhat of "bad reason", but it does work.

I dont consider it a problem nor a bug if the underline of the headings connect to the edge of a thumbnail as long as it doesnt go over it. But, for what it's worth, the room around the image is now preserved by margin. And to continue to make the underline stop when it hits the margin see https://bugzilla.wikimedia.org/show_bug.cgi?id=26449#c7 for that.

By adding { overflow: hidden; } to H1, H2, H3, H4, H5, H6 the underline doesn't continue.