/* *= depend_on semantic_ui/theme.config *= depend_on semantic_ui/config/elements/input.overrides *= depend_on semantic_ui/config/elements/input.variables */ /* * # 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 (multiple) 'semantic_ui/theme.config'; & { /******************************* Standard *******************************/ /*-------------------- Inputs ---------------------*/ .ui.input { position: relative; display: inline-block; color: @inputColor; } .ui.input input { margin: 0em; width: 100%; outline: none; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); text-align: @textAlign; line-height: @lineHeight; font-family: @inputFont; padding: @padding; background: @background; border: @border; color: @inputColor; border-radius: @borderRadius; transition: @transition; box-shadow: @boxShadow; } /*-------------------- 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.loading.input > i.icon:before { position: absolute; content: ''; top: 50%; left: 50%; margin: @loaderMargin; width: @loaderSize; height: @loaderSize; border-radius: @circularRadius; border: @loaderLineWidth solid @loaderFillColor; } .ui.loading.loading.input > i.icon:after { position: absolute; content: ''; top: 50%; left: 50%; margin: @loaderMargin; width: @loaderSize; height: @loaderSize; animation: button-spin @loaderSpeed linear; animation-iteration-count: infinite; border-radius: @circularRadius; border-color: @loaderLineColor transparent transparent; border-style: solid; border-width: @loaderLineWidth; box-shadow: 0px 0px 0px 1px transparent; } /*-------------------- 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; } /* Transparent Icon */ .ui.transparent.icon.input > i.icon { width: @transparentIconWidth; } .ui.transparent.icon.input > input { padding-left: 0em !important; padding-right: @transparentIconMargin !important; } .ui.transparent[class*="left icon"].input > input { padding-left: 0em !important; padding-left: @transparentIconMargin !important; } /* Transparent Inverted */ .ui.transparent.inverted.input input::-moz-placeholder { color: @transparentInvertedPlaceholderColor; } .ui.transparent.inverted.input { color: @transparentInvertedColor; } .ui.transparent.inverted.input input { color: inherit; } /*-------------------- Icon ---------------------*/ .ui.icon.input > i.icon { cursor: default; position: absolute; text-align: center; top: 0px; right: 0px; margin: 0em; height: 100%; width: @iconWidth; opacity: @iconOpacity; border-radius: 0em @borderRadius @borderRadius 0em; transition: @iconTransition; } .ui.icon.input input { padding-right: @iconMargin !important; } .ui.icon.input > i.icon:before, .ui.icon.input > i.icon:after { left: 0; position: absolute; text-align: center; top: 50%; width: 100%; margin-top: @iconOffset; } .ui.icon.input > i.link.icon { cursor: pointer; } .ui.icon.input > i.circular.icon { top: @circularIconVerticalOffset; right: @circularIconHorizontalOffset; } /* Left Icon Input */ .ui[class*="left icon"].input > i.icon { right: auto; left: @borderWidth; border-radius: @borderRadius 0em 0em @borderRadius; } .ui[class*="left icon"].input > i.circular.icon { right: auto; left: @circularIconHorizontalOffset; } .ui[class*="left icon"].input > input { padding-left: @iconMargin !important; padding-right: @horizontalPadding !important; } /* Focus */ .ui.icon.input > input:focus ~ i.icon { opacity: 1; } /*-------------------- Labeled ---------------------*/ /* Adjacent Label */ .ui.labeled.input { display: inline-flex; } .ui.labeled.input > .label { flex: 1 0 auto; margin: 0; font-size: 1em; } .ui.labeled.input > .label:not(.corner) { padding-top: @verticalPadding; padding-bottom: @verticalPadding; } /* Fluid Labeled */ .ui.fluid.labeled.input { display: flex; } /* Label on Left */ .ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > input { border-left: none; border-top-left-radius: 0px; border-bottom-left-radius: 0px; } .ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > .label { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } /* Label on Right */ .ui[class*="right labeled"].input > input { border-right: none; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; } .ui[class*="right labeled"].input > .label { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } /* Corner Label */ .ui.labeled.input .corner.label { top: @labelCornerTop; right: @labelCornerRight; font-size: @labelCornerSize; border-radius: 0em @borderRadius 0em 0em; } .ui.labeled.input input { padding-right: @labeledMargin !important; } /* Spacing with corner label */ .ui[class*="corner labeled"].icon.input:not(.left) > input { padding-right: @labeledIconInputMargin !important; } .ui[class*="corner labeled"].icon.input:not(.left) > .icon { margin-right: @labeledIconMargin; } /*-------------------- Action ---------------------*/ .ui.action.input { display: inline-flex; } .ui.action.input > .button, .ui.action.input > .buttons { flex: 1 0 auto; } .ui.action.input > .button, .ui.action.input > .buttons > .button { padding-top: @verticalPadding; padding-bottom: @verticalPadding; margin: 0; } /* Fluid */ .ui.fluid.action.input { display: flex; } /* Button on Right */ .ui.action.input:not([class*="left action"]) > input { border-right: none; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; } .ui.action.input:not([class*="left action"]) > .button, .ui.action.input:not([class*="left action"]) > .buttons > .button { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } /* Button on Left */ .ui[class*="left action"].input > .button, .ui[class*="left action"].input > .buttons > .button { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } .ui[class*="left action"].input > input { border-left: none; border-top-left-radius: 0px; border-bottom-left-radius: 0px; } /*-------------------- Inverted ---------------------*/ /* Standard */ .ui.inverted.input input { border: none; } /*-------------------- Fluid ---------------------*/ .ui.fluid.input { display: block; } /*-------------------- Size ---------------------*/ .ui.mini.input { font-size: @mini; } .ui.small.input { font-size: @small; } .ui.input { font-size: @medium; } .ui.large.input { font-size: @large; } .ui.big.input { font-size: @big; } .ui.huge.input { font-size: @huge; } .ui.massive.input { font-size: @massive; } .loadUIOverrides(); }