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