Page MenuHomePhabricator

Highlight target references
Closed, ResolvedPublic

Description

Author: garyvdm

Description:
If you lick on the numbered link created by the <ref> tag, you are taken to the appropriate reference. If the article is smaller than the screen height, ie there is no vertical scrolling, it if difficult to see which reference you were looking for.

It is very easy to highlight the appropriate reference using the css :target selector. (Unfortunaly this is only supported by Gecko and Webkit browsers.)

The css we would need to add would look something like this:

:target
{
	font-weight:bold;
}

Version: unspecified
Severity: enhancement
URL: https://en.wikipedia.org/wiki/User:Garyvdm/monobook.css

Details

Reference
bz8303
Related Gerrit Patches:
mediawiki/extensions/Cite : masterHighlight target references

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:33 PM
bzimport added a project: Cite.
bzimport set Reference to bz8303.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Dec 18 2006, 8:54 AM

ayg wrote:

JavaScript fallback would be good too for older browsers.

ayg wrote:

This requires some way of having Cite add CSS . . . note that Monobook's main.css currently just contains a rule for Cite in core. Not sure we want to add more of those (or keep the existing one). Is there some way for extensions to stick stuff in the autogenerated CSS without adding a whole new file?

KTC added a comment.Aug 11 2008, 11:10 PM

This now exist, tested and work for Gecko (Firefox), WebKit (Safari), and Presto (Opear) based browser. Nope, doesn't work for Trident (IE).

ayg wrote:

It's a CSS change specific to the English Wikipedia. enwiki-specific changes have no bearing on Mediazilla bugs, which deal with the software as we ship it. Please test on a clean installation of MediaWiki next time, or at least on obscure wikis. Reopening.

Most (in fact: all wikis I tested) wikis have something like

ol.references > li:target,
sup.reference:target {
background: #def;
}

in their Common.css now, so it seems reasonable to include this directly with the extension.

(In reply to comment #2)

This requires some way of having Cite add CSS . . . note that Monobook's
main.css currently just contains a rule for Cite in core. Not sure we want
to
add more of those (or keep the existing one). Is there some way for
extensions
to stick stuff in the autogenerated CSS without adding a whole new file?

Now with RessourceLoader this is no longer any problem, in fact, a modules/ext.cite.css file already exists.

KTC added a subscriber: KTC.Dec 13 2014, 9:53 PM
fbstj added a subscriber: fbstj.

Change 196172 had a related patch set uploaded (by Gerrit Patch Uploader):
Highlight target references

https://gerrit.wikimedia.org/r/196172

Schnark claimed this task.Mar 12 2015, 8:29 AM
He7d3r updated the task description. (Show Details)Mar 12 2015, 3:57 PM
He7d3r added a project: User-notice.
He7d3r set Security to None.

Change 196172 merged by jenkins-bot:
Highlight target references

https://gerrit.wikimedia.org/r/196172

matmarex closed this task as Resolved.Mar 16 2015, 11:02 AM
matmarex removed a project: Patch-For-Review.
matmarex removed subscribers: gerritbot, Unknown Object (MLST).

Included in wmf/1.25wmf22