flatter-ui/lib/less/modules/inputs.import.less
2014-07-08 12:32:42 +02:00

303 lines
4.9 KiB
Plaintext
Executable File

/* Mixins
===============================*/
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
.input-placeholder() {
&::-webkit-input-placeholder {color: #fff}
&:-moz-placeholder {color: #fff}
&::-moz-placeholder {color: #fff}
&:-ms-input-placeholder {color: #fff}
}
.transition(@property: all) {
-webkit-transition: @property .3s ease-in-out;
-moz-transition: @property .3s ease-in-out;
transition: @property .3s ease-in-out;
}
/* Main Colors
===============================*/
.turq {
background:@turquoise;
&:checked {background: @green-sea}
}
.blue {
background:@peter-river;
&:checked {background:@belize-hole}
}
.yellow {
background:@sun-flower;
&:checked {background:@orange}
}
.red {
background:@alizarin;
&:checked {background: @pomegranate}
}
.dark {
background:@wet-asphalt;
&:checked {background:@midnight-blue}
}
.sun {
background:@carrot;
&:checked {background:@pumpkin}
}
.check, .circles, .radio {
outline: none !important;
-webkit-appearance: none;
-moz-appearance: none !important;
}
/* Menus
===============================*/
nav {
.border-radius(4px);
position: relative;
margin:30px auto;
margin-bottom: 40px;
padding: 15px;
text-align: left;
li {
list-style: none;
color:#fff;
font-weight: 600;
display:inline-block;
& > a, a:visited {
.transition;
padding: 15px;
color:#fff;
text-decoration: none;
}
& > a:hover {
.transition;
background:rgba(0, 0, 0, 0.1);
}
}
}
.nav-search {
.transition;
.input-placeholder;
.border-radius(4px);
position: absolute;
right: .6em;
top: .7em;
background:rgba(0, 0, 0, 0.1);
border: none;
padding: .2em;
padding-left: .4em;
outline: none;
&:focus {
.transition;
background:#fff;
color: @asbestos;
font-weight: 600;
}
}
/* Checkbox
===============================*/
.check, .circles {
.transition(background-color);
&:after {
font-family: FontAwesome;
content:"\f00d";
color: #fff;
}
&:checked:after {
content:"\f00c";
}
}
.check {
.square(30px);
.border-radius(4px);
position: relative;
text-align: center;
&:after {
position: absolute;
top: 7px;
left: 8px;
}
&:checked:after {
position: absolute;
top: 7px;
left: 6px;
}
}
/* Circle Checkbox
===============================*/
.circles {
.square(30px);
.border-radius(100px);
position: relative;
margin: 8px;
&:checked {
&:after {
position: absolute;
left: 6px;
top: 6px;
}
}
&:after {
position: absolute;
left: 8px;
top: 6px;
}
}
/* Radiobutton
===============================*/
.radio {
.square(30px);
.transition;
.border-radius(100px);
display: inline-block;
position: relative;
margin: 10px;
margin-top: 0px;
&:checked {
.transition;
}
&:checked:after {
.square(20px);
.border-radius(100px);
position: absolute;
top: 5px;
left: 5px;
background: #fff;
content: "";
}
}
/* Search
===============================*/
.search {
.input-placeholder;
.border-radius(4px);
padding: 10px;
width: 300px;
display: block;
margin:0 auto;
margin-bottom: 10px;
border: none;
color:#fff;
outline: none;
&:focus {
background:#fff;
border:2px solid #34495E;
color:#34495E;
font-weight: 600;
}
}
/* Dropdown menu
===============================*/
.drop-wrap {
width: 300px;
margin:0px auto;
ul {
.border-radius(4px);
margin-top: .4em;
list-style: none;
text-align: left;
display: none;
width: 300px;
background: @turquoise;
padding: 0;
overflow: hidden;
}
li {
display: block;
color:#fff;
font-size:0.8em;
padding: .6em;
cursor: pointer;
&:hover {
background: @green-sea;
cursor: pointer;
}
}
}
.main-drop {
.border-radius(4px);
position: relative;
width: 300px;
background: @green-sea;
padding: .6em;
text-align: left;
font-weight: 400;
color:#fff;
cursor: pointer;
&:after {
.size(1.8em, 2em);
.border-radius(4px);
background: @turquoise;
font-family: FontAwesome;
content:"\f0d7";
font-size: 1.4em;
padding-top: .3em;
padding-left:.6em;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
/* Range
===============================*/
input[type='range'] {
.transition;
.border-radius(5px);
position: absolute;
right: 10px;
left: 10px;
width: 300px;
-webkit-appearance: none;
background: #34495E;
height: 10px;
margin: 0px auto;
&::-webkit-slider-thumb {
.transition;
.border-radius(100px);
-webkit-appearance: none;
background-color: #1ABC9C;
height: 20px;
width: 20px;
}
&::-webkit-slider-thumb:active {
.transition;
padding: 11px;
}
}