2016-03-28 00:19:44 +02:00
|
|
|
form {
|
|
|
|
display: block;
|
|
|
|
width: 20em;
|
|
|
|
}
|
2016-03-19 21:37:04 +01:00
|
|
|
form ul {
|
|
|
|
list-style-type: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
2016-03-28 00:19:44 +02:00
|
|
|
form ul li {
|
|
|
|
margin-top: 0.5em;
|
|
|
|
}
|
2016-04-08 15:46:31 +02:00
|
|
|
form ul li label {
|
|
|
|
display: block;
|
|
|
|
padding: 0.5em 0;
|
|
|
|
}
|
2016-04-07 22:54:45 +02:00
|
|
|
form .input {
|
|
|
|
margin-bottom: 1em;
|
|
|
|
}
|
2016-03-28 00:19:44 +02:00
|
|
|
form .buttons {
|
|
|
|
margin-top: 1em;
|
|
|
|
}
|
2016-04-10 15:55:56 +02:00
|
|
|
form .input li:first-child label:not(.radio):not(.checkbox):not(.file-dropper),
|
2016-03-28 00:19:44 +02:00
|
|
|
form .input li:first-child {
|
|
|
|
padding-top: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
2016-03-19 21:37:04 +01:00
|
|
|
|
|
|
|
form.tabular ul {
|
|
|
|
display: table;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
form.tabular ul li {
|
|
|
|
display: table-row;
|
|
|
|
}
|
2016-04-10 15:55:56 +02:00
|
|
|
form.tabular ul li label:not(.radio):not(.checkbox):not(.file-dropper) {
|
2016-03-19 21:37:04 +01:00
|
|
|
display: table-cell;
|
|
|
|
width: 33%;
|
|
|
|
}
|
2016-04-08 15:46:31 +02:00
|
|
|
form.tabular .messages,
|
2016-03-19 21:37:04 +01:00
|
|
|
form.tabular .buttons {
|
|
|
|
margin-left: 33%;
|
|
|
|
}
|
|
|
|
|
2016-04-07 17:27:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Radio buttons and checkboxes
|
|
|
|
*/
|
2016-03-28 00:19:44 +02:00
|
|
|
input[type=radio], input[type=checkbox] {
|
2016-04-07 17:27:48 +02:00
|
|
|
position: absolute;
|
|
|
|
opacity: 0;
|
2016-03-28 00:19:44 +02:00
|
|
|
}
|
|
|
|
.radio, .checkbox {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
padding-left: calc(20px + 0.5em) !important;
|
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.radio:hover:before, .checkbox:hover:before {
|
|
|
|
border-color: var(--main-color);
|
|
|
|
}
|
2016-04-10 00:25:16 +02:00
|
|
|
.radio:before {
|
|
|
|
border-radius: 100%;
|
|
|
|
}
|
2016-03-28 00:19:44 +02:00
|
|
|
.radio:before, .checkbox:before {
|
|
|
|
transition: border-color 0.1s linear;
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 0;
|
|
|
|
display: block;
|
|
|
|
margin-top: -10px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
2016-04-06 15:11:20 +02:00
|
|
|
background: var(--input-enabled-background-color);
|
|
|
|
border: 2px solid var(--input-enabled-border-color);
|
2016-03-28 00:19:44 +02:00
|
|
|
content: '';
|
|
|
|
}
|
|
|
|
.radio:after {
|
2016-04-10 00:25:16 +02:00
|
|
|
background: var(--main-color);
|
2016-03-28 00:19:44 +02:00
|
|
|
transition: opacity 0.1s linear;
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 5px;
|
|
|
|
display: block;
|
|
|
|
margin-top: -5px;
|
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
border-radius: 50%;
|
|
|
|
content: '';
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
.checkbox:after {
|
|
|
|
transition: opacity 0.1s linear;
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 6px;
|
|
|
|
display: block;
|
|
|
|
margin-top: -7px;
|
|
|
|
width: 5px;
|
|
|
|
height: 9px;
|
|
|
|
border-right: 3px solid var(--main-color);
|
|
|
|
border-bottom: 3px solid var(--main-color);
|
|
|
|
content: '';
|
|
|
|
opacity: 0;
|
|
|
|
transform: rotate(45deg);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
|
|
|
|
2016-04-07 17:27:48 +02:00
|
|
|
input[type=radio]:checked + .radio:before,
|
|
|
|
input[type=checkbox]:checked + .checkbox:before {
|
|
|
|
border-color: var(--main-color);
|
|
|
|
}
|
|
|
|
input[type=radio]:checked + .radio:after,
|
|
|
|
input[type=checkbox]:checked + .checkbox:after {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
input[type=radio]:disabled + .radio:before,
|
|
|
|
input[type=checkbox]:disabled + .checkbox:before,
|
|
|
|
input[type=radio]:disabled + .radio:after,
|
|
|
|
input[type=checkbox]:disabled + .checkbox:after {
|
|
|
|
border-color: var(--input-disabled-text-color);
|
|
|
|
}
|
|
|
|
input[type=radio]:disabled + .radio,
|
|
|
|
input[type=checkbox]:disabled + .checkbox {
|
|
|
|
border-color: var(--input-disabled-font-color);
|
|
|
|
}
|
|
|
|
input[type=radio]:focus + .radio:before,
|
|
|
|
input[type=checkbox]:focus + .checkbox:before {
|
|
|
|
border-color: var(--main-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Regular inputs
|
|
|
|
*/
|
2016-04-07 22:54:45 +02:00
|
|
|
select,
|
2016-03-19 21:37:04 +01:00
|
|
|
textarea,
|
|
|
|
input[type=text],
|
|
|
|
input[type=email],
|
|
|
|
input[type=password] {
|
|
|
|
font-family: 'Inconsolata', monospace;
|
2016-04-06 15:11:20 +02:00
|
|
|
font-size: 100%;
|
2016-03-19 21:37:04 +01:00
|
|
|
padding: 0.3em;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
2016-04-06 15:11:20 +02:00
|
|
|
border: 2px solid var(--input-enabled-border-color);
|
|
|
|
background: var(--input-enabled-background-color);
|
|
|
|
color: var(--input-enabled-text-color);
|
2016-03-19 21:37:04 +01:00
|
|
|
box-shadow: none; /* :-moz-submit-invalid on FF */
|
2016-04-06 15:11:20 +02:00
|
|
|
transition: border-color 0.1s linear, background-color 0.1s linear;
|
|
|
|
}
|
|
|
|
|
2016-04-07 22:54:45 +02:00
|
|
|
select:disabled,
|
2016-04-06 15:11:20 +02:00
|
|
|
textarea:disabled,
|
|
|
|
input[type=text]:disabled,
|
|
|
|
input[type=email]:disabled,
|
|
|
|
input[type=password]:disabled {
|
|
|
|
border: 2px solid var(--input-disabled-border-color);
|
|
|
|
background: var(--input-disabled-background-color);
|
|
|
|
color: var(--input-disabled-text-color);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
|
|
|
|
2016-04-07 22:54:45 +02:00
|
|
|
select:focus,
|
2016-03-28 00:19:44 +02:00
|
|
|
textarea:focus,
|
|
|
|
input[type=text]:focus,
|
|
|
|
input[type=email]:focus,
|
|
|
|
input[type=password]:focus {
|
|
|
|
border-color: var(--main-color);
|
|
|
|
}
|
|
|
|
|
2016-04-10 00:24:14 +02:00
|
|
|
form.show-validation .input input:invalid {
|
2016-03-19 21:37:04 +01:00
|
|
|
outline: none;
|
2016-03-28 00:19:06 +02:00
|
|
|
border: 2px solid var(--input-bad-border-color);
|
|
|
|
background: var(--input-bad-background-color);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
2016-04-10 00:24:14 +02:00
|
|
|
form.show-validation .input input:valid {
|
2016-03-19 21:37:04 +01:00
|
|
|
outline: none;
|
2016-03-28 00:19:06 +02:00
|
|
|
border: 2px solid var(--input-good-border-color);
|
|
|
|
background: var(--input-good-background-color);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
|
|
|
|
2016-04-07 17:27:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Buttons
|
|
|
|
*/
|
2016-03-19 21:37:04 +01:00
|
|
|
button,
|
|
|
|
input[type=button],
|
|
|
|
input[type=submit] {
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: 100%;
|
|
|
|
line-height: 100%;
|
|
|
|
padding: 0.3em 0.7em;
|
2016-04-06 15:11:20 +02:00
|
|
|
border: 1px solid var(--button-enabled-background-color);
|
|
|
|
background: var(--button-enabled-background-color);
|
|
|
|
color: var(--button-enabled-text-color);
|
|
|
|
}
|
|
|
|
button:disabled,
|
|
|
|
input[type=button]:disabled,
|
|
|
|
input[type=submit]:disabled {
|
|
|
|
cursor: default;
|
|
|
|
border-color: var(--button-disabled-background-color);
|
|
|
|
background-color: var(--button-disabled-background-color);
|
|
|
|
color: var(--button-disabled-text-color);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
2016-04-07 17:28:02 +02:00
|
|
|
button:focus,
|
|
|
|
input[type=button]:focus,
|
|
|
|
input[type=submit]:focus {
|
|
|
|
outline: 2px solid var(--text-color);
|
|
|
|
}
|
2016-04-07 22:54:45 +02:00
|
|
|
select:-moz-focusring {
|
|
|
|
text-shadow: 0;
|
|
|
|
}
|
2016-04-07 17:28:02 +02:00
|
|
|
button::-moz-focus-inner,
|
|
|
|
input::-moz-focus-inner {
|
|
|
|
border: 0;
|
|
|
|
}
|
2016-04-10 15:55:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* File dropper
|
|
|
|
*/
|
|
|
|
.file-dropper {
|
|
|
|
background: white;
|
|
|
|
border: 3px dashed #eee;
|
|
|
|
padding: 0.3em 0.5em;
|
|
|
|
line-height: 140%;
|
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
|
|
|
word-wrap: break-word;
|
|
|
|
}
|
|
|
|
input[type=file]:disabled+.file-dropper {
|
|
|
|
cursor: default;
|
|
|
|
opacity: .5;
|
|
|
|
}
|
|
|
|
input[type=file]:active+.file-dropper,
|
|
|
|
input[type=file]:focus+.file-dropper,
|
|
|
|
.file-dropper.active {
|
|
|
|
border-color: var(--main-color);
|
|
|
|
}
|