Merge "Don't allow some E_NOTICE messages to end up in the LocalSettings.php"
[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 display: table;
70 clear: none;
71 float: none;
72 }
73
74 > figcaption {
75 display: table-caption;
76 caption-side: bottom;
77 /* In mw-core the font-size is duplicated, 94% in thumbiner
78 and again 94% in thumbcaption. 88% for font size of the
79 caption results in the same behavior. */
80 font-size: 88%;
81 line-height: 1.4em;
82 text-align: left;
83
84 border: 1px solid #ccc;
85 border-top: 0;
86
87 /* taken from .thumbcaption, plus .thumbinner */
88 padding: 1px 5px 5px;
89 background-color: #f9f9f9;
90 }
91 }
92
93 figure[typeof~='mw:Image/Thumb'],
94 figure[typeof~='mw:Image/Frame'] {
95 display: table;
96 overflow: auto;
97 text-align: center;
98 padding: 3px;
99 border: 1px solid #ccc;
100 border-bottom: 0; // No border to caption
101 border-collapse: collapse;
102 background-color: #f9f9f9;
103 // Default to right alignment. This is needed since Parsoid only specifies the
104 // alignment class when the alignment is explicitly set.
105 margin: .5em 0 1.3em 1.4em;
106 clear: right;
107 float: right;
108 }
109
110 figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
111 figure[typeof~='mw:Image/Frame'] > *:first-child > img,
112 .mw-image-border > *:first-child > img {
113 border: 1px solid #cccccc;
114 margin: 4px;
115 }
116
117 /* Hide the caption for frameless and plain floated images */
118 figure[typeof~="mw:Image/Frameless"] > figcaption,
119 figure[typeof~="mw:Image"] > figcaption { display: none }
120
121 /*
122 * Finally, some basic styling for Parsoid render testing.
123 * Only Parsoid directly sets .mw-body-content directly on the body, so this
124 * shouldn't affect anything else.
125 */
126 body.mw-body-content {
127 background-color: #fff;
128 padding: 0.8em;
129 }