Last modified: 2012-01-04 03:38:18 UTC
I finished writing up and testing some CSS pseudolink styling for toggles. If you want your collapse/expand toggles to appear like normal (Vector skin) links, put the following CSS in your MediaWiki:Common.css: <pre> /* For mw-collapsible toggles to make them look like regular links */ /* :visited, :hover, and :active pseudoclasses must always be in that order! */ .pseudolink { cursor:pointer; color:#0645AD; } .pseudolink:visited { color:#0B0080; } .pseudolink:hover { text-decoration:underline; } .pseudolink:active { color:#faa700; } </pre> I think that should be built in, to supplement the jQuery MakeCollapsible features in 1.18. See also, about cursors: https://bugzilla.wikimedia.org/show_bug.cgi?id=30327 I think the regular pointer cursor is better, and more familiar. The up-down arrows are used for moving window panes.
Another note: The :visited property does not work on the MakeCollapsible pseudolink class here. I just tried this: <span class="mw-customtoggle-restrikes">[[#|click to show]]</span> And it works just as well as my CSS, but :visited still does not work. Of course, I don't think :visited makes any sense on a toggle, so in fact it is good that it does not work. I still included it in my pseudolink class to make it generic in case it is used somewhere where it would be helpful for :visited to work.
It appears [[#|click to show]] does not work at mediawiki.org, so I assume there's some setting that's forwarding that kind of link to the main page. Can that be turned off for WMF to make pseudolinks work?
Some documentation: http://www.mediawiki.org/w/index.php?title=Help:Links&oldid=477239
*** Bug 30327 has been marked as a duplicate of this bug. ***
badon, if you're indicating that your patch here needs review, please attach the patch as a diff: https://www.mediawiki.org/wiki/Patch#Posting_a_patch Thanks!
From what I understand from the IRC convo we had and the other edits/bugs created, this was proposed because of [[#|]] not working. However with that assumption being wrong and it do working where it is needed [1], I think this bug is invalid. badon, if this is indeed still valid, please re-open :) Krinkle [1] There is a case, discovered thanks to badon, where [[#|]] still goes wrong, but that doens't apply to this situation and has been recorded under bug 33437.,
I think it's valid, but since there's a better way to do this once bug 33437 gets fixed, this bug is WONTFIX. Sumana: thanks for the link! As time goes by, I'm gaining more experience in understanding how MediaWiki works, so I'll probably be able to produce patches in the near future.