mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-14 10:34:53 +00:00
530ef0ab9c
Highlight the target reference when the user clicks a reference link, and also highlight the note in the text when he clicks the backlink. This is done using the :target selector and a light blue background-color. The color (and the rest of the code) are from English Wikipedia, from where it has been copied to many other wikis, so the feature itself and especially the color seem to be agreed on. Browsers that don't support the :target selector (notably Internet Explorer 8 and below) will just ignore the new style and fall back to current behavior. Wikis that have added this code to their common.css can remove it, but of course nothing will break when they keep the duplicate code. Bug: T10303 Change-Id: I5775daf6934516ce9c98841399e5a358195c1374
38 lines
1,002 B
CSS
38 lines
1,002 B
CSS
/**
|
|
* Per http://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html
|
|
* and https://en.wikipedia.org/w/index.php?oldid=572888139#Scrolling_past_the_bottom_of_the_page...
|
|
*/
|
|
.cite-accessibility-label {
|
|
position: absolute !important;
|
|
/* Workaround a Webkit/Blink bug about positioning within columns as many wikis format references with several columns */
|
|
top: -99999px;
|
|
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
padding: 0 !important;
|
|
border: 0 !important;
|
|
height: 1px !important;
|
|
width: 1px !important;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.mw-cite-backlink,
|
|
.cite-accessibility-label {
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
/* Highlight clicked reference in blue to help navigation */
|
|
ol.references li:target,
|
|
sup.reference:target {
|
|
background-color: #def; /* fallback */
|
|
background-color: rgba(0, 127, 255, 0.133);
|
|
}
|
|
|
|
@media print {
|
|
.mw-cite-backlink {
|
|
display: none;
|
|
}
|
|
}
|