UNPKG

metro4

Version:

The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style

271 lines (229 loc) 5.93 kB
@import (once) "../../include/vars"; @import (once) "../../include/mixins"; .input { display: flex; flex-flow: row nowrap; justify-content: space-between; width: 100%; padding: 0; &:hover { input { border-color: transparent; } } &.focused { box-shadow: 0 0 0 3px rgba(red(@lightGray), green(@lightGray), blue(@lightGray), 0.45); } input { border: none!important; order: 1; flex-grow: 1; flex-shrink: 0; flex-basis: 0; height: 34px; padding: 0 .75rem; &:focus { box-shadow: none; } } .button-group { display: flex; flex-wrap: nowrap; } .button { background-color: transparent; color: @dark; height: 34px; min-width: 34px; &:focus, &:active { box-shadow: none!important; } &:hover { background-color: @light; text-shadow: rgba(0,0,0,.25) 0.1em 0.1em 0.2em; } } .input-clear-button, .input-reveal-button, .input-search-button { background-color: transparent; &:hover { background-color: transparent; } } &.disabled .button-group { button { background-color: @light; color: darken(@light, 10%); } } .prepend {order: 1} .append {order: 4} input {order: 2;} .button-group {order: 3;} .prepend, .append { display: flex; align-items: center; justify-content: center; } } .input { .autocomplete-list { margin: 0; padding: 0; list-style: none inside; position: absolute; top: 100%; left: 0; width: 100%; overflow: hidden; overflow-y: auto; background-color: @white; height: auto; border: 1px solid @borderColor; z-index: 3; .item { display: block; position: relative; padding: 4px 8px; cursor: pointer; &:hover { background-color: @hoverBackground; } } .item + .item { border-top: 1px solid @borderColor; } } } .input { &.input-large { height: @input-lx; input { height: @input-lx - 2; font-size: 1.3rem; padding: 0 10px; line-height: @input-lx - 2; } .button { height: @input-lx - 2; min-width: @input-lx - 2; font-size: 1.3rem; [class*=mif-] { font-size: 1.3rem; } .default-icon-cross, .default-icon-eye { width: 21px; height: 21px; } .input-clear-button, .input-reveal-button { width: @input-lx - 2; padding: 0; } } input[placeholder] {font-size: 1.1rem;} input::-moz-placeholder {font-size: 1.1rem;} input:-moz-placeholder {font-size: 1.1rem;} input:-ms-input-placeholder {font-size: 1.1rem;} .append, .prepend { height: @input-lx - 2; line-height: @input-lx - 2; padding: 0 .5rem; font-size: 1.3rem; } } } input { &.input-large { height: @input-lx - 2; font-size: 1.3rem; padding: 0 10px; } } input.input-large[placeholder] {font-size: 1.1rem;} input.input-large::-moz-placeholder {font-size: 1.1rem;} input.input-large:-moz-placeholder {font-size: 1.1rem;} input.input-large:-ms-input-placeholder {font-size: 1.1rem;} .input { &.input-small { height: @input-sx; input { height: @input-sx - 2; font-size: .9rem; padding: 0 4px; line-height: @input-sx - 2; } .button { height: @input-sx - 2; min-width: @input-sx - 2; font-size: .9rem; padding: 0; [class*=mif-] { font-size: .9rem; } .default-icon-cross, .default-icon-eye { width: 14px; height: 14px; } } .input-clear-button, .input-reveal-button { width: @input-sx - 2; padding: 0; } input[placeholder] {font-size: .8rem;} input::-moz-placeholder {font-size: .8rem;} input:-moz-placeholder {font-size: .8rem;} input:-ms-input-placeholder {font-size: .8rem;} .append, .prepend { height: @input-sx - 2; line-height: @input-sx - 2; padding: 0 .5rem; font-size: .9rem; } } } input { &.input-small { height: @input-sx - 2; font-size: .9rem; padding: 0 4px; } } input.input-small[placeholder] {font-size: .8rem;} input.input-small::-moz-placeholder {font-size: .8rem;} input.input-small:-moz-placeholder {font-size: .8rem;} input.input-small:-ms-input-placeholder {font-size: .8rem;} .input { &[dir=rtl], &.rtl { input { order: 3; direction: rtl; } .button-group { order: 2; } .prepend { order: 4; } .append { order: 1; } flex-flow: row-reverse nowrap; } } .input { .badge { position: absolute; font-size: 9px; font-weight: 100; text-transform: uppercase; background-color: #0a87c1; color: #ffffff; border-radius: 6px; padding: 2px 4px; top: 50%; right: 10px; transform: translateY(-50%); } &:hover .badge { display: none; } }