Merge "mediawiki.notification: Use data-mw-foo instead of data-mw.foo"
[lhc/web/wiklou.git] / resources / src / mediawiki.special.preferences.styles.ooui.less
1 @import 'mediawiki.mixins';
2
3 /* Reuses colors from mediawiki.legacy/shared.css */
4 .mw-email-not-authenticated .oo-ui-labelWidget,
5 .mw-email-none .oo-ui-labelWidget {
6 background-color: #fdf1d1;
7 color: #000;
8 border: 1px solid #fde29b;
9 padding: 0.5em;
10 }
11 /* Authenticated email field has its own class too. Unstyled by default */
12 /*
13 .mw-email-authenticated .oo-ui-labelWidget { }
14 */
15
16 /* This is needed because add extra buttons in a weird way */
17 .mw-prefs-buttons .mw-htmlform-submit-buttons {
18 display: inline;
19 margin: 0;
20 }
21
22 .mw-prefs-buttons {
23 margin-top: 1em;
24 }
25
26 #prefcontrol {
27 margin-right: 0.5em;
28 }
29
30 /*
31 * Hide, but keep accessible for screen-readers.
32 */
33 .client-js .mw-navigation-hint:not( :focus ) {
34 .mixin-screen-reader-text;
35 }
36
37 /* Override OOUI styles so that dropdowns near the bottom of the form don't get clipped,
38 * e.g.'Appearance' / 'Threshold for stub link formatting'. This is hacky and bad, it would be
39 * better solved by setting overlays for the widgets, but we can't do it from PHP... */
40 #preferences .oo-ui-panelLayout {
41 position: static;
42 overflow: visible;
43 .transform( none );
44 }
45
46 #preferences .oo-ui-menuLayout .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed {
47 border-width: 0;
48 border-radius: 0;
49 padding-left: 0;
50 padding-right: 0;
51 box-shadow: none;
52 }
53
54 .mw-prefs-faketabs > .oo-ui-menuLayout > .oo-ui-menuLayout-menu a {
55 color: inherit;
56 text-decoration: none;
57 }
58
59 /* Disabled JavaScript */
60 .client-nojs {
61 /* Adjust the borders: frame each prefsection instead of the
62 * whole tabLayout wrapper */
63 #preferences .oo-ui-menuLayout .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed:first-child {
64 border-color: #c8ccd1;
65 border-width: 1px 0 0;
66 }
67
68 #preferences .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed:last-child {
69 padding-bottom: 0;
70 margin-bottom: 0;
71 }
72
73 /* Fake Tabs to address reflow */
74 .mw-prefs-faketabs {
75 border-width: 0;
76 border-radius: 0;
77 .box-shadow( none );
78
79 > .oo-ui-menuLayout > .oo-ui-menuLayout-content > .oo-ui-stackLayout {
80 margin-bottom: 1em;
81 }
82
83 /* Hide the tab menu when JS is disabled as we can't use this feature */
84 > .oo-ui-menuLayout > .oo-ui-menuLayout-menu {
85 display: none;
86 }
87 }
88 }
89
90 /* Enabled JavaScript
91 * Hide top level legends when JS is enabled, as they will not be visible
92 * when the real tabLayout is built */
93 .client-js #preferences {
94 .oo-ui-tabPanelLayout {
95 padding-top: 0.5em;
96
97 & > fieldset > legend {
98 display: none;
99 }
100 }
101
102 .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed {
103 margin-top: 2.286em; /* equals `32px` at `font-size: 14px;` */
104 margin-bottom: 0;
105 border-width: 0;
106 border-radius: 0;
107 padding: 0;
108 box-shadow: none;
109
110 &:first-child {
111 margin-top: 0.85714286em;
112 }
113
114 .oo-ui-panelLayout-framed:first-child {
115 margin-top: 0;
116 }
117 }
118
119 > .oo-ui-panelLayout > .oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-header {
120 margin-bottom: 1em;
121 }
122 }
123
124 /* Make the "Basic information" section more compact */
125 /* OOUI's `align: 'left'` for FieldLayouts sucks, so we do our own */
126 #mw-htmlform-info {
127 > .oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
128 display: inline-block;
129 width: 20%;
130 padding: 0;
131 vertical-align: middle;
132 }
133
134 > .oo-ui-fieldLayout-align-top .oo-ui-fieldLayout-help {
135 margin-right: 0;
136 }
137
138 > .oo-ui-fieldLayout.oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
139 display: inline-block;
140 width: 80%;
141 vertical-align: middle;
142 }
143 }
144
145 /* Compact number inputs, used at "Display options" on "Recent changes" */
146 .mw-htmlform-field-HTMLFloatField,
147 .mw-htmlform-field-HTMLIntField {
148 .oo-ui-inputWidget {
149 max-width: 10em;
150 }
151 }
152
153 /* Expand the dropdown and textfield of "Time zone" field to the */
154 /* usual maximum width and display them on separate lines. */
155 #wpTimeCorrection .oo-ui-dropdownInputWidget,
156 #wpTimeCorrection .oo-ui-textInputWidget {
157 display: block;
158 max-width: 50em;
159 }
160
161 #wpTimeCorrection .oo-ui-textInputWidget {
162 margin-top: 0.5em;
163 }
164
165 /* HACK: expand width of gadget descriptions.
166 * This should be moved to the Gadgets extension */
167 #mw-htmlform-gadgets .oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body {
168 max-width: none;
169 }