3 @import 'mediawiki.skin.variables.less';
4 @import 'mediawiki.mixins.less';
8 // Apply the mw-ui-input class to input and textarea fields.
12 // Style an input using MediaWiki UI.
13 // Currently in draft status and subject to change.
14 // When focused a progressive highlight appears to the left of the field.
17 // <input class="mw-ui-input" placeholder="Enter your name">
18 // <textarea class="mw-ui-input">Text here</textarea>
20 box-sizing: border-box;
23 border-width: @border-width-base;
24 border-style: @border-style-base;
25 border-radius: @border-radius-base;
27 // `@box-shadow-color-transparent` necessary for smooth transition.
28 box-shadow: @box-shadow-inset-small @box-shadow-color-transparent;
31 line-height: 1.28571429em;
32 vertical-align: middle;
34 // Normalize & style placeholder text, see T139034
36 color: @color-placeholder;
37 opacity: @opacity-base;
40 // Firefox: Remove red outline when `required` attribute set and invalid content.
41 // See https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid
42 // This should come before `:focus` so latter rules take preference.
48 background-color: @background-color-base;
49 color: @color-emphasized;
50 border-color: @border-color-base;
51 transition-property: @transition-property-base;
52 transition-duration: @transition-duration-medium;
55 border-color: @border-color-input--hover;
59 border-color: @border-color-progressive--focus;
60 box-shadow: @box-shadow-inset-small @box-shadow-color-progressive--focus;
61 outline: @outline-base--focus;
66 background-color: @background-color-disabled-subtle;
67 color: @color-disabled;
68 border-color: @border-color-disabled;
71 // Normalize styling for `<input type="search">`
73 // Support: Safari/iOS `none` needed, Chrome would accept `textfield` as well.
74 -webkit-appearance: none;
76 -moz-appearance: textfield;
78 // Remove proprietary clear button in IE 10-11, Edge 12+
83 // Remove the inner padding and cancel buttons in Chrome on OS X and Safari on OS X
84 &::-webkit-search-cancel-button,
85 &::-webkit-search-decoration {
86 -webkit-appearance: none;
91 textarea.mw-ui-input {
97 // Use mw-ui-input-inline with mw-ui-input in cases where you want a button to line up with the input.
100 // <input class="mw-ui-input mw-ui-input-inline">
101 // <button class="mw-ui-button mw-ui-progressive">Submit</button>
102 .mw-ui-input-inline {
103 display: inline-block;
105 // Make sure we limit `width` to parent element because
106 // in case of text `input` fields, `width: auto;` equals `size` attribute.
112 // Use mw-ui-input-large with mw-ui-input in cases where there are multiple inputs on a screen and you
113 // want to draw attention to one instance. For example, replying with a subject line and more text.
114 // Currently in draft status and subject to change. When used on an input field, the text is styled
115 // in a large font. When used alongside another mw-ui-input large they are pushed together to form one
119 // <input value="input" class="mw-ui-input mw-ui-input-large" value="input" placeholder="Enter subject">
120 // <textarea class="mw-ui-input mw-ui-input-large" placeholder="Provide additional details"></textarea>
125 // When two large inputs are together, we make them flush by hiding one of the borders
126 & + .mw-ui-input-large {
127 margin-top: -@position-offset-border-width-base;
129 // When focusing, make the input relative to raise it above any attached inputs to unhide its borders
135 input.mw-ui-input-large {