hacks-guide-minimal-mistake.../assets/_scss/_forms.scss

350 lines
5.4 KiB
SCSS
Raw Normal View History

2015-01-20 21:25:57 +01:00
/* ==========================================================================
Forms
========================================================================== */
2015-04-17 12:43:36 +02:00
btnform {
margin: 0 0 5px 0;
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;
2016-03-10 17:13:54 +01:00
border-bottom: 1px solid mix(#fff, #000, 80%);
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 {
font-family: $serif;
2016-03-10 17:13:54 +01:00
box-sizing: border-box;
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;
margin-bottom: 10px / 8;
font-weight: bold;
2016-03-10 17:13:54 +01:00
color: $text-color;
cursor: pointer;
2016-03-21 21:36:24 +01:00
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%;
padding: 4px;
margin-bottom: 5px / 4;
2016-03-10 17:13:54 +01:00
background-color: #fff;
border: 1px solid mix(#fff, #000, 80%);
color: $text-color;
2016-03-21 21:36:24 +01:00
&:hover {
2016-03-10 17:13:54 +01:00
border-color: mix(#fff, $accent-color, 50%);
}
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
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 {
2016-03-10 17:13:54 +01:00
border-color: $accent-color;
outline: 0;
outline: thin dotted \9;
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 {
2016-03-21 21:36:24 +01:00
color: $info-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
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
}
/*
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: 14px;
background-color: #fff;
color: #000;
border-width: 2px !important;
border-style: solid !important;
border-color: lighten(#000,50);
border-radius: $border-radius;
}
#goog-wm-sb {
@extend .btn;
2016-03-10 17:13:54 +01:00
}