3 @import "mediawiki.mixins";
4 @import "mediawiki.ui/variables";
5 @import "mediawiki.ui/mixins";
7 // Placeholder text styling helper
8 .field-placeholder-styling() {
14 // Apply the mw-ui-input class to input and textarea fields.
20 // Style an input using MediaWiki UI.
21 // Currently in draft status and subject to change.
22 // When focused a progressive highlight appears to the left of the field.
25 // <input class="mw-ui-input" placeholder="Enter your name">
26 // <textarea class="mw-ui-input">Text here</textarea>
30 // turn off default input styling for input[type="search"] fields
31 -webkit-appearance: none;
32 border: 1px solid @colorFieldBorder;
33 .box-sizing(border-box);
35 padding: .4em .3em .2em .6em;
37 vertical-align: middle;
38 border-radius: @borderRadius;
39 // Override user agent stylesheet properties. Instead use parent element.
41 background-color: inherit;
45 .transition(~"border linear .2s, box-shadow linear .2s");
47 // Placeholder text styling must be set individually for each browser @winter
48 &::-webkit-input-placeholder { // webkit
49 .field-placeholder-styling;
51 &::-moz-placeholder { // FF 4-18
52 .field-placeholder-styling;
54 &:-moz-placeholder { // FF >= 19
55 .field-placeholder-styling;
57 &:-ms-input-placeholder { // IE >= 10
58 .field-placeholder-styling;
61 // Remove red outline from inputs which have required field and invalid content.
62 // This is a Firefox only issue
63 // See https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid
64 // This should be above :focus so focus behaviour takes preference
70 box-shadow: inset .45em 0 0 @colorProgressive;
71 border-color: @colorGrayDark;
72 // Remove focus glow on input[type="search"]
77 border-color: @colorGray14;
82 textarea.mw-ui-input {
88 // Use mw-ui-input-inline with mw-ui-input in cases where you want a button to line up with the input.
91 // <input class="mw-ui-input mw-ui-input-inline">
92 // <button class="mw-ui-button mw-ui-constructive">Submit</button>
97 display: inline-block;
103 // Use mw-ui-input-large with mw-ui-input in cases where there are multiple inputs on a screen and you
104 // want to draw attention to one instance. For example, replying with a subject line and more text.
105 // Currently in draft status and subject to change. When used on an input field, the text is styled
106 // in a large font. When used alongside another mw-ui-input large they are pushed together to form one
110 // <input value="input" class="mw-ui-input mw-ui-input-large" value="input" placeholder="Enter subject">
111 // <textarea class="mw-ui-input mw-ui-input-large" placeholder="Provide additional details"></textarea>
118 // When two large inputs are together, we make them flush by hiding one of the borders
119 & + .mw-ui-input-large {
122 // When focusing, make the input relative to raise it above any attached inputs to unhide its borders
128 input.mw-ui-input-large {
134 // Tablet and desktop specific styling tweaks.
135 @media all and (min-width: 768px) {
136 // Make inline elements take up a sensible amount of the screen on wider devices.
137 .mw-ui-input-inline {