mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 13:22:39 +03:00
362 lines
6.9 KiB
CSS
362 lines
6.9 KiB
CSS
/* Forms
|
|
/* ---------------------------------------------------------- */
|
|
|
|
form label {
|
|
display: block;
|
|
color: var(--darkgrey);
|
|
font-size: 1.3rem;
|
|
font-weight: bold;
|
|
user-select: text;
|
|
}
|
|
|
|
form .word-count {
|
|
float: right;
|
|
font-weight: bold;
|
|
}
|
|
|
|
fieldset {
|
|
margin: 0 0 3em 0;
|
|
padding: 0;
|
|
border: none;
|
|
user-select: text;
|
|
}
|
|
|
|
legend {
|
|
display: block;
|
|
margin: 2em 0;
|
|
width: 100%;
|
|
border-bottom: color(var(--lightgrey) l(-5%) s(-10%)) 1px solid;
|
|
color: var(--midgrey);
|
|
font-size: 1.2em;
|
|
line-height: 2.0em;
|
|
user-select: text;
|
|
}
|
|
|
|
input {
|
|
user-select: text;
|
|
}
|
|
|
|
::-webkit-input-placeholder {
|
|
color: color(var(--midgrey) l(+18%));
|
|
font-weight: 200;
|
|
}
|
|
|
|
:-ms-input-placeholder {
|
|
color: color(var(--midgrey) l(+18%));
|
|
font-weight: 200;
|
|
}
|
|
|
|
.error .response {
|
|
color: var(--red);
|
|
}
|
|
|
|
|
|
/* Form Groups
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.form-group {
|
|
position: relative;
|
|
margin-bottom: 1.6em;
|
|
max-width: 700px;
|
|
width: 100%;
|
|
user-select: text;
|
|
}
|
|
|
|
.form-group p {
|
|
margin: 4px 0 0 0;
|
|
color: var(--midgrey);
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.form-group h3 {
|
|
margin-bottom: 1.6em;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
@media (max-width: 550px) {
|
|
.form-group {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
|
|
/* Input Icons
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.input-icon[class*="icon-"] {
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
.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"] {
|
|
padding-left: 3.2rem;
|
|
}
|
|
|
|
.input-icon[class*="icon-"] .gh-select select {
|
|
padding-left: 3.2rem;
|
|
}
|
|
|
|
.input-icon[class*="icon-"]:before {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 1.1rem;
|
|
z-index: 100;
|
|
font-size: 1.3rem;
|
|
transform: translateY(-52%);
|
|
}
|
|
|
|
|
|
/* Inputs
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-input,
|
|
.gh-select,
|
|
select {
|
|
display: block;
|
|
padding: 10px 12px;
|
|
width: 100%;
|
|
height: 40px;
|
|
border: color(var(--lightgrey) l(-5%) s(-10%)) 1px solid;
|
|
border-radius: var(--border-radius);
|
|
color: color(var(--midgrey) l(-18%));
|
|
font-size: 1.6rem;
|
|
line-height: 1em;
|
|
font-weight: 300;
|
|
user-select: text;
|
|
transition: border-color 0.15s linear;
|
|
|
|
-webkit-appearance: none;
|
|
}
|
|
|
|
.gh-select,
|
|
select {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.gh-input.error,
|
|
.error .gh-input,
|
|
.gh-select.error,
|
|
select.error {
|
|
border-color: var(--red);
|
|
}
|
|
|
|
.gh-input:focus,
|
|
.gh-input.focus,
|
|
.gh-select:focus,
|
|
select:focus {
|
|
outline: 0;
|
|
border-color: color(var(--lightgrey) l(-15%) s(-10%));
|
|
}
|
|
|
|
textarea {
|
|
min-width: 250px;
|
|
min-height: 10rem;
|
|
max-width: 500px;
|
|
width: 100%;
|
|
height: auto;
|
|
line-height: 1.5;
|
|
user-select: text;
|
|
resize: vertical;
|
|
}
|
|
|
|
|
|
/* Radio / Checkboxes
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.for-radio label,
|
|
.for-checkbox label {
|
|
display: block;
|
|
padding-bottom: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.for-radio label p,
|
|
.for-checkbox label p {
|
|
overflow: auto;
|
|
color: #000;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.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;
|
|
margin-right: 7px;
|
|
width: 18px;
|
|
height: 18px;
|
|
border: 1px solid color(var(--lightgrey) l(-5%) s(-10%));
|
|
background: #fff;
|
|
}
|
|
|
|
.for-checkbox label:hover input:not(:checked) + .input-toggle-component,
|
|
.for-radio label:hover input:not(:checked) + .input-toggle-component {
|
|
border-color: color(var(--lightgrey) l(-15%) s(-10%));
|
|
}
|
|
|
|
.for-checkbox .input-toggle-component {
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.for-checkbox .input-toggle-component {
|
|
transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
}
|
|
|
|
.for-checkbox .input-toggle-component:before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 4px;
|
|
left: 3px;
|
|
width: 10px;
|
|
height: 6px;
|
|
border: 2px solid #fff;
|
|
border-top: none;
|
|
border-right: none;
|
|
opacity: 0;
|
|
transition: opacity 0.15s ease-in-out;
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.for-checkbox input:checked + .input-toggle-component {
|
|
border-color: color(var(--green) lightness(-10%));
|
|
background: var(--green);
|
|
}
|
|
|
|
.for-checkbox input:checked + .input-toggle-component:before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.for-radio .input-toggle-component {
|
|
border-radius: 100px;
|
|
}
|
|
|
|
.for-radio .input-toggle-component {
|
|
transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
}
|
|
|
|
.for-radio .input-toggle-component:before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 4px;
|
|
left: 4px;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #fff;
|
|
border-radius: 100%;
|
|
opacity: 0;
|
|
transition: opacity 0.15s ease-in-out;
|
|
}
|
|
|
|
.for-radio input:checked + .input-toggle-component {
|
|
border-color: color(var(--green) lightness(-10%));
|
|
background: var(--green);
|
|
}
|
|
|
|
.for-radio input:checked + .input-toggle-component:before {
|
|
opacity: 1;
|
|
}
|
|
|
|
|
|
/* Select
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-select {
|
|
position: relative;
|
|
display: block;
|
|
padding: 0;
|
|
max-width: 100%;
|
|
width: 100%;
|
|
border-width: 0;
|
|
}
|
|
|
|
.gh-select:after {
|
|
content: "\e00f";
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 1.2rem;
|
|
margin-top: -0.5em;
|
|
text-transform: none !important;
|
|
font-family: "ghosticons" !important;
|
|
font-size: 1rem;
|
|
line-height: 1;
|
|
font-weight: normal !important;
|
|
font-style: normal !important;
|
|
font-variant: normal !important;
|
|
pointer-events: none;
|
|
|
|
speak: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
.gh-select select {
|
|
padding: 10px 12px;
|
|
outline: none;
|
|
background: #fff;
|
|
text-indent: 0.01px;
|
|
text-overflow: "";
|
|
line-height: normal;
|
|
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: window;
|
|
}
|
|
|
|
.gh-select select::-ms-expand {
|
|
display: none;
|
|
}
|
|
|
|
.gh-select select:-moz-focusring {
|
|
color: transparent;
|
|
text-shadow: 0 0 0 #000;
|
|
}
|
|
|
|
|
|
/* File Uploads
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-input-file {
|
|
font-size: 1.2rem;
|
|
width: auto;
|
|
}
|
|
|
|
.gh-input-file + .gh-btn {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
/* 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: color(var(--lightgrey) l(-15%) s(-10%));
|
|
}
|
|
}
|