Merge "Update list item newline handling to follow Parsoid's model"
[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 /**
6 * References
7 *
8 * Parser and Extension:Cite output reference numbers for <sup>[1]</sup> for <ref> tags.
9 *
10 * Markup:
11 * Cake is good<sup>[2]</sup>
12 * The cake is a lie<span class="reference">[1]</span>
13 *
14 * Styleguide 1.1.
15 */
16 span.reference {
17 font-size: smaller;
18 line-height: normal;
19 vertical-align: super;
20 }
21
22 /**
23 * Block media items
24 */
25 figure[typeof*='mw:Image'] {
26 margin: 0;
27
28 a {
29 border: 0;
30 }
31
32 &.mw-halign-right {
33 /* @noflip */
34 margin: .5em 0 1.3em 1.4em;
35 /* @noflip */
36 clear: right;
37 /* @noflip */
38 float: right;
39 }
40
41 &.mw-halign-left {
42 /* @noflip */
43 margin: .5em 1.4em 1.3em 0;
44 /* @noflip */
45 clear: left;
46 /* @noflip */
47 float: left;
48 }
49
50 &.mw-halign-center {
51 margin: 0 auto .5em auto;
52 clear: none;
53 float: none;
54 }
55
56 figcaption {
57 display: table-caption;
58 caption-side: bottom;
59 /* In mw-core the font-size is duplicated, 94% in thumbiner
60 and again 94% in thumbcaption. 88% for font size of the
61 caption results in the same behavior. */
62 font-size: 88%;
63 line-height: 1.4em;
64 text-align: left;
65
66 border: 1px solid #ccc;
67 border-top: 0;
68
69 /* taken from .thumbcaption, plus .thumbinner */
70 padding: 1px 5px 5px;
71 background-color: #f9f9f9;
72 }
73 }
74
75 figure[typeof~='mw:Image/Thumb'],
76 figure[typeof~='mw:Image/Frame'] {
77 display: table;
78 overflow: auto;
79 text-align: center;
80 padding: 3px;
81 border: 1px solid #ccc;
82 border-bottom: 0; // No border to caption
83 border-collapse: collapse;
84 background-color: #f9f9f9;
85 // Default to right alignment. This is needed since Parsoid only specifies the
86 // alignment class when the alignment is explicitly set.
87 margin: .5em 0 1.3em 1.4em;
88 clear: right;
89 float: right;
90 }
91
92 figure[typeof~='mw:Image/Thumb'] img,
93 figure[typeof~='mw:Image/Frame'] img,
94 .mw-image-border img {
95 border: 1px solid #cccccc;
96 margin: 4px;
97 }
98
99 // Some basic styling for Parsoid render testing
100 body[data-parsoid] {
101 background-color: #fff;
102 padding: 0.8em;
103 }