Merge "Capitalise Message in SpecialAllMessages files"
[lhc/web/wiklou.git] / resources / src / mediawiki.skinning / content.parsoid.less
1 /**
2 * Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
3 */
4
5 /*csslint regex-selectors:false */
6
7 /*
8 * Auto-numbered external links
9 * Parsoid renders those as link without content, and lets CSS do the
10 * counting. This way the counting style can be customized, and counts update
11 * automatically when content is modified.
12 */
13 .mw-body-content {
14 counter-reset: mw-NumberedExtLink;
15 }
16
17 .mw-body-content a[rel~="mw:ExtLink"]:empty:after {
18 content: "[" counter(mw-NumberedExtLink) "]";
19 counter-increment: mw-NumberedExtLink;
20 }
21
22 /**
23 * References
24 *
25 * Parser and Extension:Cite output reference numbers for <sup>[1]</sup> for <ref> tags.
26 *
27 * Markup:
28 * Cake is good<sup>[2]</sup>
29 * The cake is a lie<span class="reference">[1]</span>
30 *
31 * Styleguide 1.1.
32 */
33 span.reference {
34 font-size: smaller;
35 line-height: normal;
36 vertical-align: super;
37 }
38
39 /**
40 * Block media items
41 */
42 figure[typeof*='mw:Image'] {
43 margin: 0;
44
45 a {
46 border: 0;
47 }
48
49 &.mw-halign-right {
50 /* @noflip */
51 margin: .5em 0 1.3em 1.4em;
52 /* @noflip */
53 clear: right;
54 /* @noflip */
55 float: right;
56 }
57
58 &.mw-halign-left {
59 /* @noflip */
60 margin: .5em 1.4em 1.3em 0;
61 /* @noflip */
62 clear: left;
63 /* @noflip */
64 float: left;
65 }
66
67 &.mw-halign-center {
68 margin: 0 auto .5em auto;
69 clear: none;
70 float: none;
71 }
72
73 > figcaption {
74 display: table-caption;
75 caption-side: bottom;
76 /* In mw-core the font-size is duplicated, 94% in thumbiner
77 and again 94% in thumbcaption. 88% for font size of the
78 caption results in the same behavior. */
79 font-size: 88%;
80 line-height: 1.4em;
81 text-align: left;
82
83 border: 1px solid #ccc;
84 border-top: 0;
85
86 /* taken from .thumbcaption, plus .thumbinner */
87 padding: 1px 5px 5px;
88 background-color: #f9f9f9;
89 }
90 }
91
92 figure[typeof~='mw:Image/Thumb'],
93 figure[typeof~='mw:Image/Frame'] {
94 display: table;
95 overflow: auto;
96 text-align: center;
97 padding: 3px;
98 border: 1px solid #ccc;
99 border-bottom: 0; // No border to caption
100 border-collapse: collapse;
101 background-color: #f9f9f9;
102 // Default to right alignment. This is needed since Parsoid only specifies the
103 // alignment class when the alignment is explicitly set.
104 margin: .5em 0 1.3em 1.4em;
105 clear: right;
106 float: right;
107 }
108
109 figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
110 figure[typeof~='mw:Image/Frame'] > *:first-child > img,
111 .mw-image-border > *:first-child > img {
112 border: 1px solid #cccccc;
113 margin: 4px;
114 }
115
116 /*
117 * Finally, some basic styling for Parsoid render testing.
118 * Only Parsoid directly sets .mw-body-content directly on the body, so this
119 * shouldn't affect anything else.
120 */
121 body.mw-body-content {
122 background-color: #fff;
123 padding: 0.8em;
124 }