Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
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.

109 lines
2.4 KiB

//
// Forms
// --------------------------------------------------
12 years ago
// Force form elements to inherit font styles
12 years ago
input,
textarea,
button,
select {
font-family: $font-family-default;
font-size: $font-size-default;
12 years ago
}
// Stretch inputs/textareas to full width and add height to maintain a consistent baseline
12 years ago
select,
textarea,
input[type="text"],
11 years ago
input[type="search"],
12 years ago
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="tel"],
11 years ago
input[type="color"] {
12 years ago
width: 100%;
height: 35px;
padding: 0 15px;
margin-bottom: 15px;
line-height: $line-height-default;
12 years ago
background-color: #fff;
border: $border-default;
12 years ago
border-radius: 3px;
outline: none;
11 years ago
-webkit-appearance: none;
12 years ago
}
// Rounded search input
11 years ago
input[type="search"] {
11 years ago
padding: 0 10px;
font-size: 16px;
border-radius: 20px;
11 years ago
box-sizing: border-box; // Override content-box in normalize
12 years ago
}
11 years ago
input[type="search"]:focus {
text-align: left;
}
12 years ago
// Allow text area's height to grow larger than a normal input
12 years ago
textarea {
height: auto;
}
// Style select button to look like part of the Ratchet's style
12 years ago
select {
height: auto;
font-size: 14px;
background-color: #f8f8f8;
11 years ago
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .1));
12 years ago
}
// Input groups (cluster multiple inputs together into a single group)
// -------------------------------------------------------------------
12 years ago
// Remove spacing, borders, shadows and rounding since it all belongs on the .input-group not the input
.input-group input,
.input-group textarea {
12 years ago
margin-bottom: 0;
background-color: transparent;
border-top: 0;
border-left: 0;
border-right: 0;
12 years ago
border-radius: 0;
11 years ago
@include box-shadow(none);
12 years ago
}
// Input groups with labels
// --------------------------------------------------
// To use labels with input groups, wrap a label and an input in an .input-row
12 years ago
.input-row {
overflow: hidden;
border-bottom: $border-default;
12 years ago
}
// Labels get floated left with a set percentage width
12 years ago
.input-row label {
float: left;
11 years ago
width: 35%;
padding: 10px 15px;
font-family: $font-family-default;
line-height: 1.1; // Put the text on the baseline.
12 years ago
}
// Actual inputs float to right of labels and also have a set percentage
11 years ago
.input-row input {
12 years ago
float: right;
width: 65%;
padding-left: 0;
margin-bottom: 0;
border: 0;
}