You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

329 lines
6.2 KiB

/*
* # Semantic - Input
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributor
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Theme
*******************************/
@type : 'element';
@element : 'input';
@import '../../semantic.config';
/*******************************
Standard
*******************************/
/*--------------------
Inputs
---------------------*/
.ui.input {
display: inline-block;
position: relative;
color: @inputColor;
}
.ui.input input {
margin: 0em;
width: 100%;
outline: none;
text-align: @textAlign;
line-height: @lineHeight;
font-family: @pageFont;
padding: @padding;
background: @background;
border: @border;
color: @inputColor;
border-radius: @borderRadius;
transition: @transition;
box-shadow: @boxShadow;
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
/*--------------------
Placeholder
---------------------*/
/* browsers require these rules separate */
.ui.input input::-webkit-input-placeholder {
color: @placeholderColor;
}
.ui.input input::-moz-placeholder {
color: @placeholderColor;
}
/*******************************
States
*******************************/
/*--------------------
Active
---------------------*/
.ui.input input:active,
.ui.input.down input {
border-color: @downBorderColor;
background: @downBackground;
color: @downColor;
box-shadow: @downBoxShadow;
}
/*--------------------
Loading
---------------------*/
.ui.loading.input > .icon {
background: url(@loadingImage) no-repeat 50% 50%;
}
.ui.loading.input > .icon:before,
.ui.loading.input > .icon:after {
display: none;
}
/*--------------------
Focus
---------------------*/
.ui.input.focus input,
.ui.input input:focus {
border-color: @focusBorderColor;
background: @focusBackground;
color: @focusColor;
box-shadow: @focusBoxShadow;
}
.ui.input.focus input input::-webkit-input-placeholder,
.ui.input input:focus input::-webkit-input-placeholder {
color: @placeholderFocusColor;
}
.ui.input.focus input input::-moz-placeholder,
.ui.input input:focus input::-moz-placeholder {
color: @placeholderFocusColor;
}
/*--------------------
Error
---------------------*/
.ui.input.error input {
background-color: @errorBackground;
border-color: @errorBorder;
color: @errorColor;
box-shadow: @errorBoxShadow;
}
/* Error Placeholder */
.ui.input.error input ::-webkit-input-placeholder {
color: @placeholderErrorColor;
}
.ui.input.error input ::-moz-placeholder {
color: @placeholderErrorColor;
}
/* Focused Error Placeholder */
.ui.input.error input :focus::-webkit-input-placeholder {
color: @placeholderErrorFocusColor;
}
.ui.input.error input :focus::-moz-placeholder {
color: @placeholderErrorFocusColor;
}
/*******************************
Variations
*******************************/
/*--------------------
Transparent
---------------------*/
.ui.transparent.input input {
border-color: transparent;
background-color: transparent;
padding: 0em;
}
/*--------------------
Icon
---------------------*/
.ui.icon.input > .icon {
cursor: default;
position: absolute;
opacity: @iconOpacity;
top: 0px;
right: 0px;
margin: 0em;
width: @iconWidth;
height: 100%;
text-align: center;
border-radius: 0em @borderRadius @borderRadius 0em;
box-sizing: border-box;
transition: @iconTransition;
}
.ui.icon.input > .icon:before,
.ui.icon.input > .icon:after {
left: 0;
position: absolute;
text-align: center;
top: 50%;
width: 100%;
margin-top: -0.5em;
}
.ui.icon.input > .link.icon {
cursor: pointer;
}
.ui.icon.input input {
padding-right: @iconMargin !important;
}
.ui.icon.input > .circular.icon {
top: @circularIconVerticalOffset;
right: @circularIconHorizontalOffset;
}
/* Left Icon Input */
.ui.left.icon.input > .icon {
right: auto;
left: @borderWidth;
border-radius: @borderRadius 0em 0em @borderRadius;
}
.ui.left.icon.input > .circular.icon {
right: auto;
left: @circularIconHorizontalOffset;
}
.ui.left.icon.input > input {
padding-left: @iconMargin !important;
padding-right: @horizontalPadding !important;
}
/* Transparent Icon */
.ui.transparent.icon.input > .icon {
width: @transparentIconWidth;
}
.ui.transparent.icon.input > input {
padding-left: 0em !important;
padding-right: @transparentIconMargin !important;
}
.ui.transparent.left.icon.input > input {
padding-left: 0em !important;
padding-left: @transparentIconMargin !important;
}
/* Focus */
.ui.icon.input > input:focus ~ .icon {
opacity: 1;
}
/*--------------------
Labeled
---------------------*/
.ui.labeled.input .corner.label {
top: @labelTop;
right: @labelRight;
font-size: @labelSize;
border-radius: 0em @borderRadius 0em 0em;
}
.ui.labeled.input input {
padding-right: @labeledMargin !important;
}
/* Spacing with corner label */
.ui.labeled.icon.input:not(.left) > input {
padding-right: @labeledIconInputMargin !important;
}
.ui.labeled.icon.input:not(.left) > .icon {
margin-right: @labeledIconMargin;
}
/*--------------------
Action
---------------------*/
.ui.action.input {
display: table;
}
.ui.action.input > input {
display: table-cell;
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
border-right: none;
}
.ui.action.input > .button,
.ui.action.input > .buttons {
display: table-cell;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
white-space: nowrap;
}
.ui.action.input > .button > .icon,
.ui.action.input > .buttons > .button > .icon {
display: inline;
vertical-align: top;
}
.ui.fluid.action.input {
display: table;
width: 100%;
}
.ui.fluid.action.input > .button {
width: 0.01%;
}
/*--------------------
Fluid
---------------------*/
.ui.fluid.input {
display: block;
}
/*--------------------
Size
---------------------*/
.ui.mini.input {
font-size: 0.8125em;
}
.ui.small.input {
font-size: 0.875em;
}
.ui.input {
font-size: 1em;
}
.ui.large.input {
font-size: 1.125em;
}
.ui.big.input {
font-size: 1.25em;
}
.ui.huge.input {
font-size: 1.375em;
}
.ui.massive.input {
font-size: 1.5rem;
}
.loadUIOverrides();