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 .box-sizing( border-box );
35 border: 1px solid @colorFieldBorder;
36 border-radius: @borderRadius;
37 padding: 0.3em 0.3em 0.3em 0.6em;
41 vertical-align: middle;
43 // Placeholder text styling must be set individually for each browser @winter
44 &::-webkit-input-placeholder { // webkit
45 .field-placeholder-styling;
47 &::-moz-placeholder { // FF 4-18
48 .field-placeholder-styling;
50 &:-moz-placeholder { // FF >= 19
51 .field-placeholder-styling;
53 &:-ms-input-placeholder { // IE >= 10
54 .field-placeholder-styling;
57 // Remove red outline from inputs which have required field and invalid content.
58 // This is a Firefox only issue
59 // See https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid
60 // This should be above :focus so focus behaviour takes preference
66 box-shadow: inset 0 0 0 2px @colorProgressive;
67 // Color being used to match inset shadow, not semantic reasons
68 border-color: @colorProgressive;
69 // Remove focus glow on input[type="search"]
74 border-color: @colorGray14;
79 textarea.mw-ui-input {
85 // Use mw-ui-input-inline with mw-ui-input in cases where you want a button to line up with the input.
88 // <input class="mw-ui-input mw-ui-input-inline">
89 // <button class="mw-ui-button mw-ui-constructive">Submit</button>
94 display: inline-block;
100 // Use mw-ui-input-large with mw-ui-input in cases where there are multiple inputs on a screen and you
101 // want to draw attention to one instance. For example, replying with a subject line and more text.
102 // Currently in draft status and subject to change. When used on an input field, the text is styled
103 // in a large font. When used alongside another mw-ui-input large they are pushed together to form one
107 // <input value="input" class="mw-ui-input mw-ui-input-large" value="input" placeholder="Enter subject">
108 // <textarea class="mw-ui-input mw-ui-input-large" placeholder="Provide additional details"></textarea>
115 // When two large inputs are together, we make them flush by hiding one of the borders
116 & + .mw-ui-input-large {
119 // When focusing, make the input relative to raise it above any attached inputs to unhide its borders
125 input.mw-ui-input-large {