Module:Citation/CS1/styles.css
Jump to navigation
Jump to search
1 /*-------------------------< P R O T E C T I O N I C O N >--------------------
2
3 the following line controls the page-protection icon in the upper right corner
4 it must remain within this comment
5 {{sandbox other||{{pp-template}}}}
6
7 */
8
9
10 /*-------------------------< O V E R R I D E S >--------------------------------
11
12 cs1|2 references are wrapped in <cite>...</cite> tags. Some wikis have not
13 chosen to override the generic user agent italic styling as en.wiki has. This
14 (untested) styling should override the user agent default when cs1|2 templates
15 are rendered.
16
17 Similarly, some languages use different quotation punctuation so that setting
18 is also made available here.
19 */
20 cite.citation {
21 /* Reset italic styling set by user agent (only for cs1|2 templates; the
22 reason for the .citation qualifier) */
23 font-style: inherit;
24 }
25
26 .citation q {
27 /* Straight quote marks for <q>; keep same as [[MediaWiki:Common.css]] */
28 quotes: '"' '"' "'" "'";
29 }
30
31 /* ID and URL access
32 Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external
33 for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need
34 to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon.
35
36 the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}}
37 */
38
39 .id-lock-free a,
40 .citation .cs1-lock-free a {
41 background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png);
42 background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg);
43 background-repeat: no-repeat;
44 background-size: 9px;
45 background-position: right .1em center;
46 }
47
48 .id-lock-limited a,
49 .id-lock-registration a,
50 .citation .cs1-lock-limited a,
51 .citation .cs1-lock-registration a {
52 background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png);
53 background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg);
54 background-repeat: no-repeat;
55 background-size: 9px;
56 background-position: right .1em center;
57 }
58
59 .id-lock-subscription a,
60 .citation .cs1-lock-subscription a {
61 background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png);
62 background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg);
63 background-repeat: no-repeat;
64 background-size: 9px;
65 background-position: right .1em center;
66 }
67
68 .cs1-subscription,
69 .cs1-registration {
70 color: #555;
71 }
72
73 .cs1-subscription span,
74 .cs1-registration span {
75 border-bottom: 1px dotted;
76 cursor: help;
77 }
78
79 /* Wikisource icon
80 Experiment to see if it is possible/practical to add support for a wikisource
81 icon when |chapter= or |title= is wikilinked to a source in wikisource ala cite wikisource
82 */
83 .cs1-ws-icon a {
84 background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png);
85 background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg);
86 background-repeat: no-repeat;
87 background-size: 12px;
88 background-position: right .1em center;
89 }
90
91 /* Errors and maintenance */
92 code.cs1-code {
93 /* <code>...</code> style override: mediawiki's css definition is specified here:
94 https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
95 */
96 color: inherit;
97 background: inherit;
98 border: inherit; /* code editor doesn't like inherit with border?
99 https://www.w3.org/wiki/CSS/Properties/border
100 suggests that inherit is ok
101 the actual spec says the code editor is correct:
102 https://www.w3.org/TR/css-backgrounds-3/#borders
103 */
104 padding: inherit;
105 }
106
107 .cs1-hidden-error {
108 display: none;
109 font-size: 100%;
110 }
111
112 .cs1-visible-error {
113 font-size: 100%;
114 }
115
116 .cs1-maint {
117 display: none;
118 color: #33aa33;
119 margin-left: 0.3em;
120 }
121
122 /* Small text size
123 Set small text size in one place. 0.95 (here) * 0.9 (from references list) is
124 ~0.85, which is the lower bound for size for accessibility. Old styling for this
125 was just 0.85. We could write the rule so that when this template is inside
126 references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */
127 .cs1-subscription,
128 .cs1-registration,
129 .cs1-format {
130 font-size: 95%;
131 }
132
133 /* kerning */
134 .cs1-kern-left,
135 .cs1-kern-wl-left {
136 padding-left: 0.2em;
137 }
138
139 .cs1-kern-right,
140 .cs1-kern-wl-right {
141 padding-right: 0.2em;
142 }
143
144 /* selflinks – avoid bold font style when cs1|2 template links to the current page */
145 .citation .mw-selflink {
146 font-weight: inherit;
147 }