3 @import "mediawiki.mixins";
4 @import "mediawiki.ui/variables";
5 @import "mediawiki.ui/mixins";
9 // Apply the mw-ui-input class to input and textarea fields.
15 // Style an input using MediaWiki UI.
16 // Currently in draft status and subject to change.
17 // When focused a progressive highlight appears to the left of the field.
20 // <input class="mw-ui-input" placeholder="Enter your name">
21 // <textarea class="mw-ui-input">Text here</textarea>
25 background-color: #fff;
27 .box-sizing( border-box );
30 border: 1px solid @colorFieldBorder;
31 border-radius: @borderRadius;
32 padding: 0.3em 0.3em 0.3em 0.6em;
33 // necessary for smooth transition
34 box-shadow: inset 0 0 0 0.1em #fff;
38 vertical-align: middle;
40 // Normalize & style placeholder text, see T139034
41 /* stylelint-disable indentation */
45 // TODO: Is italic necessary? T147808
48 /* stylelint-enable indentation */
50 // Firefox: Remove red outline when `required` attribute set and invalid content.
51 // See https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid
52 // This should come before `:focus` so latter rules take preference.
58 border-color: @colorGray7;
62 border-color: @colorProgressive;
63 box-shadow: inset 0 0 0 1px @colorProgressive;
67 // `:not()` is used exclusively for `transition`s as both are not supported by IE < 9.
69 .transition( ~'color 100ms, border-color 100ms, box-shadow 100ms' );
73 border-color: @colorGray14;
77 // Normalize styling for `<input type="search">`
79 // Correct the odd appearance in Chrome and Safari 5
80 -webkit-appearance: textfield;
82 // Remove proprietary clear button in IE 10-11, Edge 12+
87 // Remove the inner padding and cancel buttons in Chrome on OS X and Safari on OS X
88 &::-webkit-search-cancel-button,
89 &::-webkit-search-decoration {
90 -webkit-appearance: none;
95 textarea.mw-ui-input {
101 // Use mw-ui-input-inline with mw-ui-input in cases where you want a button to line up with the input.
104 // <input class="mw-ui-input mw-ui-input-inline">
105 // <button class="mw-ui-button mw-ui-progressive">Submit</button>
108 input[type="number"],
109 .mw-ui-input-inline {
110 display: inline-block;
112 // Make sure we limit `width` to parent element because
113 // in case of text `input` fields, `width: auto;` equals `size` attribute.
119 // Use mw-ui-input-large with mw-ui-input in cases where there are multiple inputs on a screen and you
120 // want to draw attention to one instance. For example, replying with a subject line and more text.
121 // Currently in draft status and subject to change. When used on an input field, the text is styled
122 // in a large font. When used alongside another mw-ui-input large they are pushed together to form one
126 // <input value="input" class="mw-ui-input mw-ui-input-large" value="input" placeholder="Enter subject">
127 // <textarea class="mw-ui-input mw-ui-input-large" placeholder="Provide additional details"></textarea>
134 // When two large inputs are together, we make them flush by hiding one of the borders
135 & + .mw-ui-input-large {
138 // When focusing, make the input relative to raise it above any attached inputs to unhide its borders
144 input.mw-ui-input-large {