Ghost/ghost/admin/app/styles/patterns/forms.css

334 lines
6.3 KiB
CSS
Raw Normal View History

2015-05-14 16:45:37 +03:00
/* Forms
/* ---------------------------------------------------------- */
2015-05-14 23:30:25 +03:00
form * {
user-select: text;
}
2015-05-14 16:45:37 +03:00
form label {
display: block;
color: var(--darkgrey);
font-size: 1.3rem;
font-weight: bold;
}
form .word-count {
float: right;
font-weight: bold;
}
fieldset {
margin: 0 0 3em 0;
padding: 0;
2015-05-16 14:43:12 +03:00
border: none;
2015-05-14 16:45:37 +03:00
}
legend {
display: block;
margin: 2em 0;
2015-05-16 14:43:12 +03:00
width: 100%;
border-bottom: #dfe1e3 1px solid;
color: #b1b1b1;
2015-05-14 16:45:37 +03:00
font-size: 1.2em;
line-height: 2.0em;
}
2015-05-14 23:30:25 +03:00
input {
user-select: text;
}
.form-group.error .response {
color: var(--red);
}
2015-05-14 16:45:37 +03:00
/* Form Groups
/* ---------------------------------------------------------- */
.form-group {
position: relative;
margin-bottom: 1.6em;
max-width: 500px;
2015-05-16 14:43:12 +03:00
width: 100%;
2015-05-14 16:45:37 +03:00
}
.form-group p {
margin: 4px 0 0 0;
color: #b1b1b1;
2015-05-14 16:45:37 +03:00
font-size: 1.3rem;
}
.form-group label {
margin-bottom: 4px;
}
@media (max-width: 550px) {
.form-group {
max-width: 100%;
}
}
/* Input Icons
/* ---------------------------------------------------------- */
2015-05-16 00:28:30 +03:00
.input-icon[class*="icon-"] {
2015-05-14 16:45:37 +03:00
position: relative;
display: block;
}
2015-05-16 00:28:30 +03:00
.input-icon[class*="icon-"] input[type="email"],
.input-icon[class*="icon-"] input[type="number"],
.input-icon[class*="icon-"] input[type="password"],
.input-icon[class*="icon-"] input[type="search"],
.input-icon[class*="icon-"] input[type="tel"],
.input-icon[class*="icon-"] input[type="text"],
.input-icon[class*="icon-"] input[type="url"],
.input-icon[class*="icon-"] input[type="date"] {
2015-05-14 16:45:37 +03:00
padding-left: 3.2rem;
}
2015-05-16 00:28:30 +03:00
.input-icon[class*="icon-"] .gh-select select {
2015-05-14 16:45:37 +03:00
padding-left: 3.2rem;
}
2015-05-16 00:28:30 +03:00
.input-icon[class*="icon-"]:before {
2015-05-14 16:45:37 +03:00
position: absolute;
top: 50%;
left: 1.1rem;
2015-05-16 14:43:12 +03:00
z-index: 100;
2015-05-14 16:45:37 +03:00
font-size: 1.3rem;
transform: translateY(-52%);
}
/* Inputs
/* ---------------------------------------------------------- */
.gh-input,
.gh-select,
select {
display: block;
padding: 8px 10px;
2015-05-14 16:45:37 +03:00
width: 100%;
border: 1px solid #dfe1e3;
2015-05-14 16:45:37 +03:00
border-radius: var(--border-radius);
color: #666;
2015-05-14 16:45:37 +03:00
font-size: 1.4rem;
font-weight: normal;
user-select: text;
2015-05-14 16:45:37 +03:00
transition: border-color 0.15s linear;
2015-05-16 14:43:12 +03:00
-webkit-appearance: none;
2015-05-14 16:45:37 +03:00
}
.gh-input.error,
.form-group.error .gh-input,
2015-05-14 16:45:37 +03:00
.gh-select.error,
select.error {
border-color: var(--red);
}
.gh-input:focus,
.gh-input.focus,
2015-05-14 16:45:37 +03:00
.gh-select:focus,
select:focus {
outline: 0;
border-color: #b1b1b1;
2015-05-14 16:45:37 +03:00
}
textarea {
min-width: 250px;
min-height: 10rem;
2015-05-16 14:43:12 +03:00
max-width: 500px;
width: 100%;
height: auto;
2015-05-14 16:45:37 +03:00
line-height: 1.5;
2015-05-14 23:30:25 +03:00
user-select: text;
resize: vertical;
2015-05-14 16:45:37 +03:00
}
/* Radio / Checkboxes
/* ---------------------------------------------------------- */
.for-radio label,
.for-checkbox label {
display: block;
padding-bottom: 4px;
}
.for-radio label p,
.for-checkbox label p {
color: #000;
2015-05-16 14:43:12 +03:00
font-weight: normal;
2015-05-14 16:45:37 +03:00
}
.for-radio label:hover input:not(:checked) + .input-toggle-component,
.for-checkbox label:hover input:not(:checked) + .input-toggle-component {
border-color: #dfe1e3;
2015-05-14 16:45:37 +03:00
}
.for-radio input,
.for-checkbox input {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: -9999px;
}
.for-radio .input-toggle-component,
.for-checkbox .input-toggle-component {
position: relative;
top: 1px;
display: inline-block;
float: left;
2015-05-16 14:43:12 +03:00
margin-right: 7px;
2015-05-14 16:45:37 +03:00
width: 18px;
height: 18px;
border: 1px solid #dfe1e3;
background: #f7f7f7;
2015-05-14 16:45:37 +03:00
}
.for-radio p,
.for-checkbox p {
2015-05-16 00:28:30 +03:00
color: #b3b2a8;
2015-05-14 16:45:37 +03:00
white-space: nowrap;
2015-05-16 14:43:12 +03:00
font-weight: normal;
2015-05-14 16:45:37 +03:00
}
.for-checkbox .input-toggle-component {
border-radius: var(--border-radius);
}
.for-checkbox .input-toggle-component {
2015-05-14 16:45:37 +03:00
transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.for-checkbox .input-toggle-component:before {
2015-05-16 00:28:30 +03:00
content: "";
2015-05-14 16:45:37 +03:00
position: absolute;
top: 4px;
left: 3px;
2015-05-16 14:43:12 +03:00
width: 10px;
height: 6px;
2015-05-14 16:45:37 +03:00
border: 2px solid #fff;
border-top: none;
border-right: none;
opacity: 0;
2015-05-16 14:43:12 +03:00
transition: opacity 0.15s ease-in-out;
transform: rotate(-45deg);
2015-05-14 16:45:37 +03:00
}
.for-checkbox input:checked + .input-toggle-component {
2015-05-14 16:45:37 +03:00
border-color: color(var(--green) lightness(-10%));
2015-05-16 14:43:12 +03:00
background: var(--green);
2015-05-14 16:45:37 +03:00
}
.for-checkbox input:checked + .input-toggle-component:before {
2015-05-14 16:45:37 +03:00
opacity: 1;
}
.for-radio .input-toggle-component {
border-radius: 100px;
}
.for-radio .input-toggle-component {
2015-05-14 16:45:37 +03:00
transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.for-radio .input-toggle-component:before {
2015-05-16 00:28:30 +03:00
content: "";
2015-05-14 16:45:37 +03:00
position: absolute;
top: 4px;
left: 4px;
2015-05-16 14:43:12 +03:00
width: 8px;
height: 8px;
2015-05-16 00:28:30 +03:00
background: #fff;
2015-05-14 16:45:37 +03:00
border-radius: 100%;
opacity: 0;
2015-05-16 14:43:12 +03:00
transition: opacity 0.15s ease-in-out;
2015-05-14 16:45:37 +03:00
}
.for-radio input:checked + .input-toggle-component {
2015-05-14 16:45:37 +03:00
border-color: color(var(--green) lightness(-10%));
2015-05-16 14:43:12 +03:00
background: var(--green);
2015-05-14 16:45:37 +03:00
}
.for-radio input:checked + .input-toggle-component:before {
2015-05-14 16:45:37 +03:00
opacity: 1;
}
/* Select
/* ---------------------------------------------------------- */
.gh-select {
position: relative;
display: block;
overflow: hidden;
padding: 0;
2015-05-16 14:43:12 +03:00
max-width: 100%;
width: 100%;
2015-05-14 16:45:37 +03:00
border-width: 0;
}
.gh-select:after {
2015-05-16 14:43:12 +03:00
content: "\e00f";
position: absolute;
top: 50%;
right: 1.2rem;
2015-05-16 14:43:12 +03:00
margin-top: -0.5em;
text-transform: none !important;
2015-05-14 16:45:37 +03:00
font-family: "ghosticons" !important;
font-size: 1rem;
2015-05-16 14:43:12 +03:00
line-height: 1;
2015-05-14 16:45:37 +03:00
font-weight: normal !important;
2015-05-16 14:43:12 +03:00
font-style: normal !important;
2015-05-14 16:45:37 +03:00
font-variant: normal !important;
2015-05-16 14:43:12 +03:00
pointer-events: none;
2015-05-14 16:45:37 +03:00
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.gh-select select {
2015-05-16 14:43:12 +03:00
padding: 8px 10px;
outline: none;
background: #fff;
2015-05-14 16:45:37 +03:00
text-indent: 0.01px;
text-overflow: "";
line-height: normal;
2015-05-16 14:43:12 +03:00
appearance: none;
-webkit-appearance: none;
-moz-appearance: window;
2015-05-14 16:45:37 +03:00
}
.gh-select select::-ms-expand {
display: none;
}
.gh-select select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
/* FFF: Fucking Firefox Fixes
/* ---------------------------------------------------------- */
@-moz-document url-prefix() {
.gh-select {
border-width: 1px;
}
.gh-select select {
padding: 7px 10px 7px 8px;
}
.gh-select:focus {
border-color: #b1b1b1;
2015-05-14 16:45:37 +03:00
}
}