2 * Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
5 /*csslint regex-selectors:false */
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.
14 counter-reset: mw-NumberedExtLink;
17 .mw-body-content a[rel~="mw:ExtLink"]:empty:after {
18 content: "[" counter(mw-NumberedExtLink) "]";
19 counter-increment: mw-NumberedExtLink;
25 * Parser and Extension:Cite output reference numbers for <sup>[1]</sup> for <ref> tags.
28 * Cake is good<sup>[2]</sup>
29 * The cake is a lie<span class="reference">[1]</span>
36 vertical-align: super;
46 figure[typeof*='mw:Image'] {
55 margin: .5em 0 1.3em 1.4em;
64 margin: .5em 1.4em 1.3em 0;
72 margin: 0 auto .5em auto;
79 display: table-caption;
81 /* In mw-core the font-size is duplicated, 94% in thumbiner
82 and again 94% in thumbcaption. 88% for font size of the
83 caption results in the same behavior. */
88 border: 1px solid #ccc;
91 /* taken from .thumbcaption, plus .thumbinner */
93 background-color: #f9f9f9;
97 figure[typeof~='mw:Image/Thumb'],
98 figure[typeof~='mw:Image/Frame'] {
103 border: 1px solid #ccc;
104 border-bottom: 0; // No border to caption
105 border-collapse: collapse;
106 background-color: #f9f9f9;
107 // Default to right alignment. This is needed since Parsoid only specifies the
108 // alignment class when the alignment is explicitly set.
109 margin: .5em 0 1.3em 1.4em;
114 figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
115 figure[typeof~='mw:Image/Frame'] > *:first-child > img,
116 .mw-image-border > *:first-child > img {
117 border: 1px solid #cccccc;
121 /* Hide the caption for frameless and plain floated images */
122 figure[typeof~="mw:Image/Frameless"] > figcaption,
123 figure[typeof~="mw:Image"] > figcaption { display: none }
126 * Finally, some basic styling for Parsoid render testing.
127 * Only Parsoid directly sets .mw-body-content directly on the body, so this
128 * shouldn't affect anything else.
130 body.mw-body-content {
131 background-color: #fff;