chota/src/_form.css

139 lines
3.5 KiB
CSS

fieldset {
padding: 0.5rem 2rem;
}
legend {
text-transform: uppercase;
font-size: 0.8em;
letter-spacing: 0.1rem;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),
select,
textarea,
textarea[type=text] {
font-family: inherit;
padding: 0.7rem 1rem;
border-radius: 4px;
border: 1px solid var(--lightGrey-color);
font-size: 1em;
transition: all 0.2s ease;
display: block;
width: 100%;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):hover,
select:hover,
textarea:hover,
textarea[type=text]:hover {
border-color: #aaa;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,
select:focus,
textarea:focus,
textarea[type=text]:focus {
outline: none;
border-color: var(--primary-color);
}
select {
-webkit-appearance: none;
background-color: #fafafa;
border: 1px solid var(--lightGrey-color);
background-position: right center;
background-repeat: no-repeat;
background-size: 1ex;
background-origin: content-box;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' fill='#555'><polygon points='0,0 60,0 30,40'/></svg>");
}
[type="checkbox"],
[type="radio"] {
-webkit-appearance: none;
width: 1.6rem;
height: 1.6rem;
margin: -0.2rem 0.2rem;
border: 1px solid #aaa;
}
[type="radio"] {
border-radius: 50%;
box-shadow: inset 0 0 0 3px white;
}
[type="radio"]:checked {
background-color: var(--primary-color);
}
[type="checkbox"]:checked {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAaCAYAAACgoey0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAX9JREFUeNpi+P//PwMNsS4QbwBiLnQ5WlqqAsRP/0PARiBmoYfFkkB8+z8qWALEjLS0mB+IL/3HDibSymJQXB7/jx/UgNSCvU4lwAbEG4DYkwi1WUxUspQZiOcRaSkIWOAKMk0Sg3jaf+IBOIVjMyQWiH8DsR+RljaTYOkBWJ5GNwRk2R+ooh9A7ETA0jwSLL0ATfEYqRpkyVc0xR+A2AyHpdFA/I9IS0F5WhRbAWIEtQQbeAXE6lhC5jeRlj4GYgVsRaYK1HBCmmWgmuyxhAwu8BpaXjNgs/gYkYbcAGIXPCGDDkCOM8eVPkCEFhE+JhX8BGJnfAkTxgC57BOVLAXlihBC2RA9Vf+k0FJQKk8nJv+jCwQi5WNyQAWxpR02wRQS8icy6CKlmMUlUUGipfOQK3lKLAbhdhIKfWZS6258kiAfzCZg6V4gZiOn0UBIAcgn63BYehK50Ke2xQxQH+3FUoqJUtJMIlYhLxAfxVJu09xiWENuMxCrUaNhCBBgAOAVfjALa5TLAAAAAElFTkSuQmCC") var(--primary-color) no-repeat center;
background-size: 1rem;
}
/* BUTTONS */
.button,
[type=button],
[type=reset],
[type=submit],
button {
padding: 1rem 2.5rem;
color: #333;
background: #e6e6e6;
border-radius: 4px;
border: none;
font-size: 1.5rem;
line-height: 1;
transition: all 0.2s ease;
text-decoration: none;
transform: scale(1);
transition: all 300ms;
display: inline-block;
}
.button + .button {
margin-left: 1rem;
}
.button:hover,
[type=button]:hover,
[type=reset]:hover,
[type=submit]:hover,
button:hover {
opacity: 0.8;
}
.button:active,
[type=button]:active,
[type=reset]:active,
[type=submit]:active,
button:active {
transform: scale(0.98);
}
input[disabled] {
opacity: 0.4;
cursor: not-allowed;
}
.button.primary,
[type=submit] {
color: #fff;
background: var(--primary-color);
}
.button.outline {
background-color: transparent;
border: 1px solid var(--lightGrey-color);
}
.button.outline.primary {
border-color: var(--primary-color);
color: var(--primary-color);
}
.button.clear {
background-color: transparent;
border-color: transparent;
color: var(--primary-color);
}