Allow third party code to hook-up MIME type detection
[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: 1;
36 vertical-align: super;
37 }
38
39 sup, sub {
40 line-height: 1;
41 }
42
43 /**
44 * Block media items
45 */
46 figure[typeof*='mw:Image'] {
47 margin: 0;
48
49 a {
50 border: 0;
51 }
52
53 &.mw-halign-right {
54 /* @noflip */
55 margin: .5em 0 1.3em 1.4em;
56 /* @noflip */
57 clear: right;
58 /* @noflip */
59 float: right;
60 }
61
62 &.mw-halign-left {
63 /* @noflip */
64 margin: .5em 1.4em 1.3em 0;
65 /* @noflip */
66 clear: left;
67 /* @noflip */
68 float: left;
69 }
70
71 &.mw-halign-center {
72 margin: 0 auto .5em auto;
73 display: table;
74 clear: none;
75 float: none;
76 }
77
78 > figcaption {
79 display: table-caption;
80 caption-side: bottom;
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. */
84 font-size: 88%;
85 line-height: 1.4em;
86 text-align: left;
87
88 border: 1px solid #ccc;
89 border-top: 0;
90
91 /* taken from .thumbcaption, plus .thumbinner */
92 padding: 1px 5px 5px;
93 background-color: #f9f9f9;
94 }
95 }
96
97 figure[typeof~='mw:Image/Thumb'],
98 figure[typeof~='mw:Image/Frame'] {
99 display: table;
100 overflow: auto;
101 text-align: center;
102 border: 1px solid #ccc;
103 border-bottom: 0; // No border to caption
104 border-collapse: collapse;
105 background-color: #f9f9f9;
106 // Default to right alignment. This is needed since Parsoid only specifies the
107 // alignment class when the alignment is explicitly set.
108 margin: .5em 0 1.3em 1.4em;
109 clear: right;
110 float: right;
111 }
112
113 figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
114 figure[typeof~='mw:Image/Frame'] > *:first-child > img,
115 .mw-image-border > *:first-child > img {
116 border: 1px solid #cccccc;
117 margin: 3px;
118 }
119
120 /* Hide the caption for frameless and plain floated images */
121 figure[typeof~="mw:Image/Frameless"] > figcaption,
122 figure[typeof~="mw:Image"] > figcaption { display: none }
123
124 /*
125 * Finally, some basic styling for Parsoid render testing.
126 * Only Parsoid directly sets .mw-body-content directly on the body, so this
127 * shouldn't affect anything else.
128 */
129 body.mw-body-content {
130 background-color: #fff;
131 padding: 0.8em;
132 }