Merge "resourceloader: Simplify StringSet fallback"
[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 /* Most outer Panellayout:
38 * Decrease contrast of `border` slightly as padding/border combination is sufficient
39 * accessibility wise and focus of content is more important here. */
40 #preferences .oo-ui-panelLayout-framed {
41 border-color: #c8ccd1;
42 }
43
44 #preferences .oo-ui-menuLayout .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed {
45 border-width: 0;
46 border-radius: 0;
47 padding-left: 0;
48 padding-right: 0;
49 box-shadow: none;
50 }
51
52 .mw-prefs-faketabs > .oo-ui-menuLayout > .oo-ui-menuLayout-menu a {
53 color: inherit;
54 text-decoration: none;
55 }
56
57 /* Disabled JavaScript */
58 .client-nojs {
59 /* Adjust the borders: frame each prefsection instead of the
60 * whole tabLayout wrapper */
61 #preferences .oo-ui-menuLayout .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed:first-child {
62 border-color: #c8ccd1;
63 border-width: 1px 0 0;
64 }
65
66 #preferences .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed:last-child {
67 padding-bottom: 0;
68 margin-bottom: 0;
69 }
70
71 /* Fake Tabs to address reflow */
72 .mw-prefs-faketabs {
73 border-width: 0;
74 border-radius: 0;
75 .box-shadow( none );
76
77 > .oo-ui-menuLayout > .oo-ui-menuLayout-content > .oo-ui-stackLayout {
78 margin-bottom: 1em;
79 }
80
81 /* Hide the tab menu when JS is disabled as we can't use this feature */
82 > .oo-ui-menuLayout > .oo-ui-menuLayout-menu {
83 display: none;
84 }
85 }
86 }
87
88 /* Enabled JavaScript
89 * Hide top level legends when JS is enabled, as they will not be visible
90 * when the real tabLayout is built */
91 .client-js #preferences {
92 .oo-ui-tabPanelLayout {
93 padding-top: 0.5em;
94
95 & > fieldset > legend {
96 display: none;
97 }
98 }
99
100 .oo-ui-panelLayout-framed .oo-ui-panelLayout-framed {
101 margin-top: 2.286em; /* equals `32px` at `font-size: 14px;` */
102 margin-bottom: 0;
103 border-width: 0;
104 border-radius: 0;
105 padding: 0;
106 box-shadow: none;
107
108 &:first-child {
109 margin-top: 0.85714286em;
110 }
111
112 .oo-ui-panelLayout-framed:first-child {
113 margin-top: 0;
114 }
115 }
116
117 > .oo-ui-panelLayout > .oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-header {
118 margin-bottom: 1em;
119 }
120 }
121
122 /* Make the "Basic information" section more compact */
123 /* OOUI's `align: 'left'` for FieldLayouts sucks, so we do our own */
124 #mw-htmlform-info {
125 > .oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
126 display: inline-block;
127 width: 20%;
128 padding: 0;
129 vertical-align: middle;
130 }
131
132 > .oo-ui-fieldLayout-align-top .oo-ui-fieldLayout-help {
133 margin-right: 0;
134 }
135
136 > .oo-ui-fieldLayout.oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
137 display: inline-block;
138 width: 80%;
139 vertical-align: middle;
140 }
141 }
142
143 /* Compact number inputs, used at "Display options" on "Recent changes" */
144 .mw-htmlform-field-HTMLFloatField,
145 .mw-htmlform-field-HTMLIntField {
146 .oo-ui-inputWidget {
147 max-width: 10em;
148 }
149 }
150
151 /* Expand the dropdown and textfield of "Time zone" field to the */
152 /* usual maximum width and display them on separate lines. */
153 #wpTimeCorrection .oo-ui-dropdownInputWidget,
154 #wpTimeCorrection .oo-ui-textInputWidget {
155 display: block;
156 max-width: 50em;
157 }
158
159 #wpTimeCorrection .oo-ui-textInputWidget {
160 margin-top: 0.5em;
161 }
162
163 /* HACK: expand width of gadget descriptions.
164 * This should be moved to the Gadgets extension */
165 #mw-htmlform-gadgets .oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body {
166 max-width: none;
167 }