Fix 'Tags' padding to keep it farther from the edge and document the source of the...
[lhc/web/wiklou.git] / resources / src / mediawiki.htmlform.ooui.styles.less
1 @import 'mediawiki.mixins';
2
3 // OOUIHTMLForm styles
4 @ooui-font-size-browser: 16; // assumed browser default of `16px`
5 @ooui-font-size-base: 0.875em; // equals `14px` at browser default of `16px`
6
7 @ooui-spacing-medium: 12 / @ooui-font-size-browser / @ooui-font-size-base; // equals `0.8571429em`≈`12px`
8 @ooui-spacing-large: 16 / @ooui-font-size-browser / @ooui-font-size-base; // equals `1.1428571em`≈`16px`
9
10 .mw-htmlform-ooui-wrapper.oo-ui-panelLayout-padded {
11 padding: @ooui-spacing-medium @ooui-spacing-large @ooui-spacing-large;
12 }
13
14 .mw-htmlform-ooui {
15 line-height: 1.4; // Override MediaWiki's default of `1.6`
16
17 .oo-ui-fieldLayout.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
18 line-height: 16 / @ooui-font-size-browser / @ooui-font-size-base;
19 }
20
21 .mw-htmlform-field-HTMLCheckMatrix {
22 width: 100%;
23 }
24
25 .mw-htmlform-matrix {
26 border-spacing: 0;
27
28 td {
29 padding: 0.35em 0.7em;
30 .transition( background-color 250ms );
31 }
32
33 tbody tr:nth-child( even ) td {
34 background-color: #f8f9fa;
35 }
36
37 tbody tr:not( :first-child ):hover td {
38 background-color: #eaecf0;
39 }
40
41 tbody tr:first-child td {
42 background-color: #fff;
43 }
44
45 td.first {
46 margin-right: 5%;
47 width: 39%;
48 }
49 }
50 }
51
52 // Flatlist styling for PHP widgets...
53 .mw-htmlform-flatlist .oo-ui-fieldLayout-align-inline,
54 // ...and for JS widgets
55 .mw-htmlform-flatlist .oo-ui-radioOptionWidget,
56 .mw-htmlform-flatlist .oo-ui-checkboxMultioptionWidget {
57 display: inline-block;
58 margin-right: @ooui-spacing-medium;
59 }
60
61 .mw-htmlform-ooui .htmlform-tip,
62 .mw-htmlform-ooui .mw-htmlform-submit-buttons {
63 margin-top: @ooui-spacing-medium;
64 }