Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5984224
input.less
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
input.less
View Options
//
Inputs
@
import
'mediawiki.skin.variables.less'
;
@
import
'mediawiki.mixins.less'
;
//
Text
inputs
//
//
Apply
the
mw-ui-input
class
to
input
and
textarea
fields
.
//
mw-ui-input
//
//
Style
an
input
using
MediaWiki
UI
.
//
Currently
in
draft
status
and
subject
to
change
.
//
When
focused
a
progressive
highlight
appears
to
the
left
of
the
field
.
//
//
Markup
:
//
<
input
class
=
"mw-ui-input"
placeholder
=
"Enter your name"
>
//
<
textarea
class
=
"mw-ui-input"
>
Text
here
</
textarea
>
.
mw-ui-input
{
box-sizing
:
border-box
;
display
:
block
;
width
:
100
%
;
border-width
:
@
border-width
-
base
;
border-style
:
@
border-style
-
base
;
border-radius
:
@
border-radius
-
base
;
padding
:
6
px
8
px
;
//
`@box-shadow-color-transparent`
necessary
for
smooth
transition.
box-shadow
:
@
box-shadow
-
inset
-
small
@
box-shadow
-
color
-
transparent
;
font-family
:
inherit
;
font-size
:
inherit
;
line-height
:
1.28571429
em
;
vertical-align
:
middle
;
//
Normalize
&
style
placeholder
text,
see
T139034
.mixin-placeholder(
{
color
:
@
color
-
placeholder
;
opacity
:
@
opacity
-
base
;
}
);
//
Firefox
:
Remove
red
outline
when
`
required
`
attribute
set
and
invalid
content
.
//
See
https
://
developer
.
mozilla
.
org
/
en-US
/
docs
/
Web
/
CSS
/
:
invalid
//
This
should
come
before
`
:
focus
`
so
latter
rules
take
preference
.
&
:
invalid
{
box-shadow
:
none
;
}
&
:
not
(
:
disabled
)
{
background-color
:
@
background-color
-
base
;
color
:
@
color
-
emphasized
;
border-color
:
@
border-color
-
base
;
transition-property
:
@
transition-property
-
base
;
transition-duration
:
@
transition-duration
-
medium
;
&:hover
{
border-color
:
@
border-color
-
input--hover
;
}
&
:
focus
{
border-color
:
@
border-color
-
progressive--focus
;
box-shadow
:
@
box-shadow
-
inset
-
small
@
box-shadow
-
color
-
progressive--focus
;
outline
:
@
outline
-
base--focus
;
}
}
&
:
disabled
{
background-color
:
@
background-color
-
disabled-subtle
;
color
:
@
color
-
disabled
;
border-color
:
@
border-color
-
disabled
;
}
//
Normalize
styling
for
`
<
input
type
=
"search"
>
`
&[
type
=
'search'
]
{
//
Support
:
Safari
/
iOS
`
none
`
needed
,
Chrome
would
accept
`
textfield
`
as
well
.
-webkit-
appearance
:
none
;
//
Support
:
Firefox
.
-moz-
appearance
:
textfield
;
//
Remove
proprietary
clear
button
in
IE
10-11,
Edge
12+
&::
-ms-
clear
{
display
:
none
;
}
//
Remove
the
inner
padding
and
cancel
buttons
in
Chrome
on
OS
X
and
Safari
on
OS
X
&
::
-webkit-search-cancel-button
,
&
::
-webkit-search-decoration
{
-webkit-
appearance
:
none
;
}
}
}
textarea
.
mw-ui-input
{
min-height
:
8
em
;
}
//
mw-ui-input-inline
//
//
Use
mw-ui-input-inline
with
mw-ui-input
in
cases
where
you
want
a
button
to
line
up
with
the
input
.
//
//
Markup
:
//
<
input
class
=
"mw-ui-input mw-ui-input-inline"
>
//
<
button
class
=
"mw-ui-button mw-ui-progressive"
>
Submit
</
button
>
.
mw-ui-input-inline
{
display
:
inline-block
;
width
:
auto
;
//
Make
sure
we
limit
`width`
to
parent
element
because
//
in
case
of
text
`input`
fields,
`
width
:
auto
;
`
equals
`size`
attribute.
max-width
:
100
%
;
}
//
mw-ui-input-large
//
//
Use
mw-ui-input-large
with
mw-ui-input
in
cases
where
there
are
multiple
inputs
on
a
screen
and
you
//
want
to
draw
attention
to
one
instance
.
For
example
,
replying
with
a
subject
line
and
more
text
.
//
Currently
in
draft
status
and
subject
to
change
.
When
used
on
an
input
field
,
the
text
is
styled
//
in
a
large
font
.
When
used
alongside
another
mw-ui-input
large
they
are
pushed
together
to
form
one
//
contiguous
block
.
//
//
Markup
:
//
<
input
value
=
"input"
class
=
"mw-ui-input mw-ui-input-large"
value
=
"input"
placeholder
=
"Enter subject"
>
//
<
textarea
class
=
"mw-ui-input mw-ui-input-large"
placeholder
=
"Provide additional details"
></
textarea
>
.
mw-ui-input-large
{
margin-top
:
0
;
margin-bottom
:
0
;
//
When
two
large
inputs
are
together,
we
make
them
flush
by
hiding
one
of
the
borders
&
+
.mw-ui-input-large
{
margin-top
:
-@
position
-
offset
-
border-width
-
base
;
}
//
When
focusing
,
make
the
input
relative
to
raise
it
above
any
attached
inputs
to
unhide
its
borders
&
:
focus
{
position
:
relative
;
}
}
input
.
mw-ui-input-large
{
padding
:
8
px
;
font-size
:
1.75
em
;
font-weight
:
bold
;
line-height
:
1.25
em
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 23:14 (2 w, 16 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
13/99/9f6addcb177e4fa17800ba54b3d9
Default Alt Text
input.less (4 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment