hacks-guide-minimal-mistake.../docs/_sass/minimal-mistakes/_forms.scss

399 lines
6.1 KiB
SCSS
Raw Normal View History

2015-01-20 21:25:57 +01:00
/* ==========================================================================
Forms
========================================================================== */
2016-08-10 21:31:20 +02:00
form {
margin: 0 0 5px 0;
padding: 1em;
background-color: $form-background-color;
2016-03-21 21:36:24 +01:00
fieldset {
margin-bottom: 5px;
padding: 0;
border-width: 0;
}
2016-03-21 21:36:24 +01:00
legend {
display: block;
width: 100%;
margin-bottom: 5px * 2;
*margin-left: -7px;
padding: 0;
2016-03-10 17:13:54 +01:00
color: $text-color;
border: 0;
white-space: normal;
}
2016-03-21 21:36:24 +01:00
p {
margin-bottom: 5px / 2;
}
2016-03-21 21:36:24 +01:00
ul {
list-style-type: none;
margin: 0 0 5px 0;
padding: 0;
}
2016-03-21 21:36:24 +01:00
br {
display: none;
}
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
label,
input,
button,
select,
textarea {
vertical-align: baseline;
*vertical-align: middle;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input,
button,
select,
textarea {
2016-03-10 17:13:54 +01:00
box-sizing: border-box;
2016-08-10 21:45:48 +02:00
font-family: $sans-serif;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
label {
display: block;
2016-08-10 21:45:48 +02:00
margin-bottom: 0.25em;
2016-03-10 17:13:54 +01:00
color: $text-color;
cursor: pointer;
2016-03-21 21:36:24 +01:00
2016-08-10 21:45:48 +02:00
small {
font-size: $type-size-6;
}
input,
textarea,
select {
display: block;
}
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input,
textarea,
select {
display: inline-block;
width: 100%;
2016-08-10 21:45:48 +02:00
padding: 0.25em;
margin-bottom: 0.5em;
color: $text-color;
background-color: $background-color;
border: $border-color;
2016-08-10 21:45:48 +02:00
border-radius: $border-radius;
box-shadow: $box-shadow;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
.input-mini {
width: 60px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
.input-small {
width: 90px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
width: auto;
height: auto;
padding: 0;
margin: 3px 0;
*margin-top: 0;
line-height: normal;
cursor: pointer;
2016-03-10 17:13:54 +01:00
border-radius: 0;
border: 0 \9;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
input[type="checkbox"],
input[type="radio"] {
2016-03-10 17:13:54 +01:00
box-sizing: border-box;
padding: 0;
*width: 13px;
*height: 13px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="image"] {
border: 0;
2016-03-10 17:13:54 +01:00
box-shadow: none;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="file"] {
width: auto;
padding: initial;
line-height: initial;
border: initial;
background-color: transparent;
background-color: initial;
2016-03-10 17:13:54 +01:00
box-shadow: none;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="button"],
input[type="reset"],
input[type="submit"] {
2016-03-10 17:13:54 +01:00
width: auto;
height: auto;
cursor: pointer;
*overflow: visible;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
select,
input[type="file"] {
2016-03-10 17:13:54 +01:00
*margin-top: 4px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
select {
2016-03-10 17:13:54 +01:00
width: auto;
background-color: #fff;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
select[multiple],
select[size] {
2016-03-10 17:13:54 +01:00
height: auto;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
textarea {
2016-03-10 17:13:54 +01:00
resize: vertical;
height: auto;
overflow: auto;
vertical-align: top;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="hidden"] {
2016-03-10 17:13:54 +01:00
display: none;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2016-08-10 21:45:48 +02:00
.form {
position: relative;
}
2013-05-24 16:25:31 +02:00
.radio,
.checkbox {
2016-03-10 17:13:54 +01:00
padding-left: 18px;
font-weight: normal;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
2016-03-10 17:13:54 +01:00
float: left;
margin-left: -18px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.radio.inline,
.checkbox.inline {
2016-03-10 17:13:54 +01:00
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
2016-03-10 17:13:54 +01:00
margin-left: 10px;
2013-05-24 16:25:31 +02:00
}
2015-01-20 21:25:57 +01:00
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
/*
2015-01-20 21:25:57 +01:00
Disabled state
========================================================================== */
2013-05-24 16:25:31 +02:00
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
2016-03-10 17:13:54 +01:00
opacity: 0.5;
cursor: not-allowed;
2013-05-24 16:25:31 +02:00
}
2015-01-20 21:25:57 +01:00
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
/*
2015-01-20 21:25:57 +01:00
Focus & active state
========================================================================== */
2013-05-24 16:25:31 +02:00
input:focus,
textarea:focus {
border-color: $primary-color;
2016-03-10 17:13:54 +01:00
outline: 0;
outline: thin dotted \9;
box-shadow: inset 0 1px 3px rgba($text-color, 0.06), 0 0 5px rgba($primary-color, 0.7);
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus {
2016-03-10 17:13:54 +01:00
box-shadow: none;
2013-05-24 16:25:31 +02:00
}
2015-01-20 21:25:57 +01:00
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
/*
2015-01-20 21:25:57 +01:00
Help text
========================================================================== */
2013-05-24 16:25:31 +02:00
.help-block,
.help-inline {
color: $muted-text-color;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.help-block {
2016-03-10 17:13:54 +01:00
display: block;
margin-bottom: 1em;
line-height: 1em;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.help-inline {
2016-03-10 17:13:54 +01:00
display: inline-block;
vertical-align: middle;
padding-left: 5px;
2013-05-24 16:25:31 +02:00
}
2015-01-20 21:25:57 +01:00
/*
.form-group
========================================================================== */
.form-group {
margin-bottom: 5px;
padding: 0;
border-width: 0;
}
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
/*
2015-01-20 21:25:57 +01:00
.form-inline
========================================================================== */
2013-05-24 16:25:31 +02:00
.form-inline input,
.form-inline textarea,
.form-inline select {
2016-03-10 17:13:54 +01:00
display: inline-block;
margin-bottom: 0;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-inline label {
2016-03-10 17:13:54 +01:00
display: inline-block;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-inline .radio,
.form-inline .checkbox,
.form-inline .radio {
2016-03-10 17:13:54 +01:00
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
2016-03-10 17:13:54 +01:00
float: left;
margin-left: 0;
margin-right: 3px; }
2015-01-20 21:25:57 +01:00
2016-03-11 21:55:06 +01:00
2015-04-17 12:43:36 +02:00
/*
2015-01-20 21:25:57 +01:00
.form-search
========================================================================== */
2013-05-24 16:25:31 +02:00
.form-search input,
.form-search textarea,
.form-search select {
2016-03-10 17:13:54 +01:00
display: inline-block;
margin-bottom: 0;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-search .search-query {
2016-03-10 17:13:54 +01:00
padding-left: 14px;
padding-right: 14px;
margin-bottom: 0;
border-radius: 14px;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-search label {
2016-03-10 17:13:54 +01:00
display: inline-block;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-search .radio,
.form-search .checkbox,
.form-inline .radio {
2016-03-10 17:13:54 +01:00
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
2013-05-24 16:25:31 +02:00
}
2016-03-11 21:55:06 +01:00
2013-05-24 16:25:31 +02:00
.form-search .radio input[type="radio"],
.form-search .checkbox input[type="checkbox"] {
2016-03-10 17:13:54 +01:00
float: left;
margin-left: 0;
margin-right: 3px;
2016-03-11 21:55:06 +01:00
}
2016-08-10 21:45:48 +02:00
/*
.form--loading
========================================================================== */
.form--loading:before {
content: '';
}
.form--loading .form__spinner {
display: block;
}
.form:before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 10;
}
.form__spinner {
display: none;
position: absolute;
top: 50%;
left: 50%;
z-index: 11;
}
2016-03-11 21:55:06 +01:00
/*
Google search form
========================================================================== */
#goog-fixurl {
ul {
list-style: none;
margin-left: 0;
padding-left: 0;
li {
list-style-type: none;
}
}
}
#goog-wm-qt {
width: auto;
margin-right: 10px;
margin-bottom: 20px;
padding: 8px 20px;
display: inline-block;
font-size: $type-size-6;
2016-03-11 21:55:06 +01:00
background-color: #fff;
color: #000;
border-width: 2px !important;
border-style: solid !important;
border-color: $border-color;
2016-03-11 21:55:06 +01:00
border-radius: $border-radius;
}
#goog-wm-sb {
@extend .btn;
2016-03-10 17:13:54 +01:00
}