Last modified: 2012-04-19 21:22:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33547, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31547 - Category links need less spacing and better wrapping
Category links need less spacing and better wrapping
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: 1.18.0 release
Assigned To: Nobody - You can work on this!
https://en.wikipedia.org/w/index.php?...
: need-integration-test, patch, patch-reviewed
: 31551 (view as bug list)
Depends on:
Blocks: 31551
  Show dependency treegraph
 
Reported: 2011-10-09 02:01 UTC by MZMcBride
Modified: 2012-04-19 21:22 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to reduce catlinks spacing (512 bytes, patch)
2011-10-16 08:25 UTC, Erwin Dokter
Details
Patch to reduce catlinks spacing (654 bytes, patch)
2011-11-02 20:35 UTC, Erwin Dokter
Details
Updated patch for catlinks spacing (386 bytes, patch)
2011-11-07 11:06 UTC, Erwin Dokter
Details

Description MZMcBride 2011-10-09 02:01:30 UTC
As reported at <https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=454640449#Categories_are_surrounded_by_much_more_space.2C_and_they_don.27t_wrap_from_line_to_line>, the category links now look bad. There's extra (excessive) spacing and the separator is always at the start of the next line, both of which are awkward and goofy.

This can be resolved on a per-site basis, but the default should be saner.
Comment 1 Daniel Friesen 2011-10-09 02:12:50 UTC
Any reason (besides IE7-8 supporting first-child but not last-child) not to use a border-right instead of border-left?
Comment 2 MZMcBride 2011-10-09 02:19:15 UTC
(In reply to comment #1)
> Any reason (besides IE7-8 supporting first-child but not last-child) not to use
> a border-right instead of border-left?

It'd be better to have MediaWiki simply wrap the first category in a distinct class or ID. That shouldn't be very difficult to implement at all and would remove the need for a pseudo-class altogether.
Comment 3 MZMcBride 2011-10-09 04:27:57 UTC
*** Bug 31551 has been marked as a duplicate of this bug. ***
Comment 4 Bawolff (Brian Wolff) 2011-10-09 04:29:46 UTC
To repeat from other duped bug - for reference: Bug 12261 / r92054 was originally where new categorylinks were introduced.
Comment 5 Erwin Dokter 2011-10-09 09:12:54 UTC
Working on a patch...
Comment 6 MZMcBride 2011-10-09 16:52:44 UTC
I haven't looked at this too closely, but I think there are two separate issues:

* changing the HTML output to be a bit easier to work with
* adjusting the CSS to be a bit more sane

If I were implementing this, I think it makes more sense to do a border-right on each <li> within catlinks. That keeps the separator on the same line as (at least) the word that precedes it, which is standard.

This:
Foo | Bar |
Baz | Bing | Bam

Rather than:
Foo | Bar
| Baz | Bing
| Bam

The latter is awkward and strange to me. Then, rather than adding a class to the first category link, you'd output a special class on the last category link and then set its border-right to none.

A little display:inline; magic and some other tweaks can fix the word-wrapping and/or spacing issues.
Comment 7 Bergi 2011-10-09 21:34:40 UTC
What do you mean with "disply:inline"-magic? Afaik inline-block is needed for paddings and borders.

My arguments for less spacing (per http://de.wikipedia.org/wiki/Wikipedia:Fragen_zur_Wikipedia#MW118:_Kategorienanzeige): Before the change there was one blank between the vertical line and the cateory link, and one blank in front of the list. A blank usually has a width of 1/4 quad (em), but since the change the spaces now have 0.7em, the one in front of the list is 0.4em additional to the blank. This may look OK in Vector, but for the older skins (expecially monobook) it looks horrible.
Please revert it to
	.catlinks li {
		padding: 0 .3em; /* or even .25 */
		border-left: 1px solid /*black*/; /* just current-color as before */
		margin: 0; /* instead of 0.1em ore more */
	}
	.catlinks li:first-child {
		padding-left: 0; /* there's already a blank left to it */
	}
in shared.css, of course you may set specific, bigger spaces or the grey line color in vector/main.css.
I'm not sure when this was introduced (r92054?), there are so many different revisions (r92245,...). E.g. r96775 was quite OK, I don't know what happened since then.
Comment 8 Mark A. Hershberger 2011-10-15 22:03:43 UTC
tagging bugs for Marcus to look at
Comment 9 Erwin Dokter 2011-10-16 08:25:35 UTC
Created attachment 9240 [details]
Patch to reduce catlinks spacing

Patch to reduce catlinks spacing.

This patch only changes existing properties without introducing new ones, minimizing the change of any CSS conflicts. This code is currently live on en.wiki's common.css.
Comment 10 Mark A. Hershberger 2011-10-26 20:52:12 UTC
r100869
Comment 11 Erwin Dokter 2011-11-02 20:33:35 UTC
The patch creates a problem in IE's compatibility view due to the line-height of 1em. I have adapted the patch.
Comment 12 Erwin Dokter 2011-11-02 20:35:03 UTC
Created attachment 9349 [details]
Patch to reduce catlinks spacing

New patch which is live in enwiki's common.css.
Comment 13 Mark A. Hershberger 2011-11-06 21:18:46 UTC
Your new patch doesn't apply cleanly against the shared.css in SVN.
Could you update it so I can apply it?
Comment 14 Erwin Dokter 2011-11-07 11:06:59 UTC
Created attachment 9369 [details]
Updated patch for catlinks spacing

New patch created against current revision.
Comment 15 Mark A. Hershberger 2011-11-07 17:05:23 UTC
r102298

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links