1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/themes/material/css/form.css
2015-08-24 17:50:34 +02:00

375 lines
7.7 KiB
CSS

/* Form */
form > div:not(.clear):not(.control) {
min-height: 9.5rem;
position: relative;
box-sizing: border-box;
}
li > form > div:not(.control) { /* If we put the form in a list */
min-height: 0;
line-height: 3rem;
padding-top: 0rem;
top: -1.5rem;
}
form > div > label {
position: absolute;
top: 2rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: 100%;
left: 0; /* We force the left align */
}
form > div.icon {
padding-left: 9rem;
}
/*
form > div > input:focus + label,
form > div > textarea:focus + label {
display: block;
}
*/
form > div > textarea {
border: none;
resize: none;
font-family: sans-serif;
line-height: 3rem;
box-sizing: border-box;
}
form > div > .select {
position: relative;
}
form > div > .select:after {
font-family: "Material Design Iconic Font";
content: "\f2be";
display: block;
font-size: 4rem;
color: #B8B8B8;
position: absolute;
right: 0;
bottom: 0.25rem;
}
form > div > .select select {
width: calc(100% + 3rem);
background-color: transparent;
}
main > header form > div:not(.clear):not(.control) {
min-height: 0;
}
main > header form > div:not(.clear):not(.control) > input,
main > header form > div:not(.clear):not(.control) > .select {
margin-top: 1.5rem;
padding-top: 0.4rem;
}
main > header form > div:not(.clear):not(.control) > .select option {
background-color: white;
color: initial;
}
main > header form > div:not(.clear):not(.control) > input,
main > header form > div:not(.clear):not(.control) > .select:after,
main > header form > div:not(.clear):not(.control) > .select select {
color: white;
}
/* Placeholders to mimic FF */
::-webkit-input-placeholder, /* WebKit browsers */
:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #fff;
opacity: 0.5;
}
form > div > .select,
form > div > input:not([type=submit]),
form > div > textarea {
display: block;
padding: 1rem 0;
padding-top: 5rem;
width: 100%;
background-color: transparent;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
margin-bottom: 1rem;
overflow: hidden; /* Fixme */
box-shadow: none; /* Firefox weird CSS */
}
/* Webkit hack */
form > div > input:not([type=submit]):-webkit-autofill {
-webkit-box-shadow: 0 0 0 50px white inset;
}
form > div > input:not([type=submit]):-webkit-autofill:focus {
-webkit-box-shadow: 0;
-webkit-text-fill-color: #333;
}
form > div > input:focus,
form > div > textarea:focus {
border-bottom-width: 2px;
margin-bottom: calc(1rem - 1px);
}
form > div > input:invalid,
form > div > input:required {
box-shadow: none;
}
/* Checkbox element */
form > div .checkbox > input[type="checkbox"],
form > div .radio > input[type="radio"] {
display: none;
}
form > div .checkbox {
position: relative;
width: 4.5rem;
height: 5rem;
top: 1rem;
}
form > div .checkbox:before,
form > div .checkbox:after {
content: '';
display: block;
position: absolute;
height: 2.25rem;
width: 2.25rem;
}
form > div .checkbox:before {
border-radius: 2rem 0 0 2rem;
}
form > div .checkbox:after {
border-radius: 0 2rem 2rem 0;
background-color: rgba(0, 0, 0, 0.25);
right: 0;
top: 0;
}
form > div .checkbox > input[type="checkbox"] + label {
z-index: 1;
display: block;
background-color: #FAFAFA;
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
width: 3rem;
height: 3rem;
border-radius: 2rem;
top: -0.5rem;
left: -0.2rem;
position: relative;
font-size: 2rem;
text-align: center;
transition: left 0.3s ease, box-shadow 0.1s ease;
}
form > div .checkbox > input[type="checkbox"] + label:hover,
form > div .checkbox > input[type="checkbox"]:checked + label:hover {
cursor: pointer;
box-shadow: 0 0 0 1.75rem rgba(0, 0, 0, 0.05), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
}
form > div .checkbox > input[type="checkbox"]:checked + label {
background-color: #009587;
left: 0.8em;
}
/* Radio */
form > div .radio > input[type="radio"] + label {
display: inline-block;
width: 2rem;
height: 2rem;
border-radius: 2rem;
border-width: 2px;
border-style: solid;
border-color: gray;
transition: box-shadow 0.1s ease;
margin-top: 1.25rem;
}
form > div .radio > input[type="radio"] + label:hover {
cursor: pointer;
background-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 0 0 1.5rem rgba(0, 0, 0, 0.1);
}
form > div .radio > input[type="radio"]:checked + label {
background-color: blue;
background-color: #009688;
border-color: #009688;
box-shadow: inset 0 0 0 0.4rem white;
}
form > div .radio > input[type="radio"]:checked + label:hover {
box-shadow: inset 0 0 0rem 0.4rem white, 0 0 0 1.5rem rgba(0, 0, 0, 0.1);
}
/* Button */
.button.oppose {
float: right;
}
.button.inactive {
opacity: 0.5;
pointer-events:none;
}
.button,
input[type=button] {
min-width: 5rem; /* 8rem ? */
text-align: center;
display: inline-block;
box-sizing: border-box;
text-transform: uppercase;
font-size: 2rem;
font-weight: 700;
line-height: 4.5rem;
height: 4.5rem;
margin: 0.75rem 0.5rem;
border-radius: 0.25rem;
background-color: white;
color: black;
padding: 0 1rem;
border: 0;
transition: background 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.5);
}
.button:active {
box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.23), 0 0.5rem 1.25rem rgba(0, 0, 0, 0.16);
}
.button.flat,
input[type=button].flat {
box-shadow: none;
background-color: transparent;
border: 0;
}
.button:hover,
input[type=button]:hover {
cursor: pointer;
}
.button.flat:hover,
.button.flat.on,
input[type=button].flat:hover {
background-color: rgba(153, 153, 153, 0.2);
}
.button:focus,
input[type=button]:focus {
border: 0;
}
.button.flat:focus,
input[type=button].flat:focus {
background-color: rgba(153, 153, 153, 0.4);
}
.button.action {
position: fixed;
bottom: 2rem;
right: 2rem;
min-height: 0rem;
min-width: 0rem;
line-height: 7rem;
height: 7rem;
width: 7rem;
z-index: 1;
font-size: 3.5rem;
}
.button.action,
.button.action .actions li {
border-radius: 10rem;
box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.23), 0 0.5rem 1.25rem rgba(0, 0, 0, 0.16);
}
.button.action:hover {
/*transform: scale(1.1);*/
background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 100%);
}
/*
.button.action:active {
transform: scale(0.95);
background-image: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%);
}
*/
.button.action,
.button.action .actions li,
.button.action > i {
transition: all 0.15s ease 0s;
}
.button.action.active > i {
transform: rotate(135deg);
}
li.action div.action .button {
margin: 0.5rem;
display: block;
}
header.big ~ .button.action {
bottom: auto;
position: relative;
float: right;
top: -6rem;
}
@media screen and (min-width: 1025px) {
main > section > div:first-child:nth-last-child(2) .button.action {
right: calc(65% + 3rem);
}
}
.button.action .actions {
position: absolute;
bottom: 7rem;
left: 0;
padding: 0;
}
.button.action .actions li {
background-color: white;
color: #888;
font-size: 3rem;
line-height: 6rem;
margin: -4rem 0.5rem;
width: 6rem;
height: 6rem;
padding: 0;
opacity: 0;
transition: all 0.15s ease 0s;
pointer-events: none;
}
.button.action.active .actions li {
opacity: 1;
pointer-events: auto;
margin: 2rem 0.5rem;
}
.button.action .actions li:hover {
background-color: white;
}