Skip to content

Commit f7ca469

Browse files
committed
Clean up hardcoded styles in Special:RequestWikiQueue
1 parent 359bea4 commit f7ca469

File tree

1 file changed

+15
-66
lines changed

1 file changed

+15
-66
lines changed

modules/ext.createwiki.oouiform.ooui.less

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
/* Fix width for the 'reason' selectorother field */
2-
#mw-input-wpreason {
3-
display: inline-flex;
4-
width: 100%;
5-
max-width: 50em;
6-
7-
.oo-ui-dropdownInputWidget {
8-
max-width: initial;
9-
}
10-
11-
.oo-ui-inputWidget {
12-
margin-right: 0;
13-
}
14-
15-
.oo-ui-textInputWidget {
16-
margin-left: 0.5em;
17-
}
18-
}
1+
@import 'mediawiki.skin.variables.less';
192

203
.ext-createwiki-tabs {
214
.ext-createwiki-fieldset-wrapper {
@@ -36,7 +19,7 @@
3619
.ext-createwiki-tabs > .oo-ui-menuLayout-content > .oo-ui-indexLayout-stackLayout > .oo-ui-tabPanelLayout {
3720
/* Decrease contrast of `border` slightly as padding/border combination is sufficient
3821
* accessibility wise and focus of content is more important here. */
39-
border-color: #c8ccd1;
22+
border-color: @border-color-subtle;
4023
}
4124

4225
/* JavaScript disabled */
@@ -54,10 +37,8 @@
5437
}
5538

5639
.ext-createwiki-section-fieldset {
57-
// <legend> is hard to style, so apply border to top of group
58-
> .oo-ui-fieldsetLayout-group {
59-
padding-top: 1.5em;
60-
border-top: 1px solid #c8ccd1;
40+
> .oo-ui-fieldsetLayout-header {
41+
margin-bottom: @spacing-150;
6142
}
6243

6344
// Remove spacing between legend and underline
@@ -66,9 +47,8 @@
6647
}
6748
}
6849

69-
// Spacing between sections
70-
> .oo-ui-menuLayout-content > .oo-ui-indexLayout-stackLayout > .oo-ui-tabPanelLayout:not( :last-child ) {
71-
margin-bottom: 1em;
50+
.oo-ui-tabPanelLayout + .oo-ui-tabPanelLayout {
51+
margin-top: @spacing-100;
7252
}
7353
}
7454
}
@@ -77,7 +57,7 @@
7757
.client-js .ext-createwiki-tabs {
7858
.oo-ui-tabPanelLayout {
7959
// Panels don't need borders as the IndexLayout is inside a framed wrapper.
80-
border: 0;
60+
border-width: 0;
8161

8262
// Hide section legend, only used in nojs mode
8363
> fieldset > legend {
@@ -93,33 +73,6 @@
9373
}
9474
}
9575

96-
#mw-htmlform-info {
97-
> .oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
98-
display: inline-block;
99-
width: 20%;
100-
padding: 0;
101-
vertical-align: middle;
102-
}
103-
104-
> .oo-ui-fieldLayout-align-top .oo-ui-fieldLayout-help {
105-
margin-right: 0;
106-
}
107-
108-
> .oo-ui-fieldLayout.oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
109-
display: inline-block;
110-
width: 80%;
111-
vertical-align: middle;
112-
}
113-
}
114-
115-
/* Compact number inputs */
116-
.mw-htmlform-field-HTMLFloatField,
117-
.mw-htmlform-field-HTMLIntField {
118-
.oo-ui-inputWidget {
119-
max-width: 10em;
120-
}
121-
}
122-
12376
.mw-special-RequestWikiQueue {
12477
#mw-section-details,
12578
#mw-section-comments,
@@ -130,22 +83,18 @@
13083
}
13184

13285
span > label {
133-
font-weight: bold;
86+
font-weight: @font-weight-bold;
13487
}
13588

89+
// HACK: Pretend to be a read-only OOUI TextInputWidget
13690
div > label {
137-
display: block;
138-
width: 100%;
139-
max-height: 15em;
140-
box-sizing: border-box;
141-
padding: 8px;
142-
border: 1.5px solid #ccc;
143-
border-radius: 4px;
144-
background-color: #f5f5f5;
145-
color: #333;
146-
font-family: 'Arial', sans-serif;
147-
line-height: 1.5em;
91+
max-width: 50em;
14892
overflow-y: auto;
93+
display: block;
94+
background-color: @background-color-interactive-subtle;
95+
border: @border-base;
96+
padding: @spacing-30 @spacing-50;
97+
border-radius: @border-radius-base;
14998
}
15099
}
151100
}

0 commit comments

Comments
 (0)