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

230 lines
4.6 KiB
CSS
Raw Normal View History

2015-05-14 16:45:37 +03:00
/* Buttons
/* ---------------------------------------------------------- */
2015-05-15 23:18:24 +03:00
/* Base button style */
2015-05-14 16:45:37 +03:00
.btn {
margin-bottom: 0;
2015-05-15 23:18:24 +03:00
padding: 9px 15px;
border: #dfe1e3 1px solid;
2015-05-16 14:43:12 +03:00
background: #fff;
background-image: none; /* Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 */
border-radius: var(--border-radius);
color: #808284;
2015-05-14 16:45:37 +03:00
text-align: center;
text-transform: uppercase;
text-shadow: none;
white-space: nowrap;
2015-05-16 14:43:12 +03:00
letter-spacing: 1px;
font-size: 1.1rem;
line-height: 1.428571429;
font-weight: 300;
2015-05-14 16:45:37 +03:00
cursor: pointer;
2015-05-16 00:28:30 +03:00
transition: color 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
/* When hovered or clicked */
.btn:hover,
.btn:focus {
border-color: var(--blue);
2015-05-16 14:43:12 +03:00
color: color(var(--blue) lightness(-10%));
2015-05-15 23:18:24 +03:00
text-decoration: none;
}
/* When focused with keyboard */
2015-05-14 16:45:37 +03:00
.btn:focus,
.btn:active:focus,
.btn.active:focus {
outline: thin dotted;
2015-05-16 00:28:30 +03:00
outline: 0 auto -webkit-focus-ring-color;
2015-05-14 16:45:37 +03:00
outline-offset: -2px;
}
2015-05-15 23:18:24 +03:00
/* When clicked */
2015-05-14 16:45:37 +03:00
.btn:active,
.btn.active {
outline: 0;
background-image: none;
2015-05-15 23:18:24 +03:00
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
/* When disabled */
2015-05-14 16:45:37 +03:00
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
2015-05-16 14:43:12 +03:00
box-shadow: none;
opacity: 0.65;
2015-05-14 16:45:37 +03:00
cursor: not-allowed;
pointer-events: none;
}
.btn i {
display: inline-block;
vertical-align: middle;
}
2015-05-14 16:45:37 +03:00
2015-05-15 23:18:24 +03:00
/* Blue button
2015-05-14 16:45:37 +03:00
/* ---------------------------------------------------------- */
2015-05-15 23:18:24 +03:00
.btn-blue {
border-color: color(var(--blue) lightness(-10%));
background: var(--blue);
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
.btn-blue:hover,
.btn-blue:active,
.btn-blue:focus {
border-color: color(var(--blue) lightness(-20%));
background: color(var(--blue) lightness(-10%));
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
/* Green button
/* ---------------------------------------------------------- */
.btn-green {
border-color: color(var(--green) lightness(-10%));
background: var(--green);
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-15 23:18:24 +03:00
}
.btn-green:hover,
.btn-green:active,
.btn-green:focus {
border-color: color(var(--green) lightness(-20%));
background: color(var(--green) lightness(-10%));
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-15 23:18:24 +03:00
}
/* Red button
/* ---------------------------------------------------------- */
.btn-red {
border-color: color(var(--red) lightness(-10%));
background: var(--red);
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-15 23:18:24 +03:00
}
.btn-red:hover,
.btn-red:active,
.btn-red:focus {
border-color: color(var(--red) lightness(-20%));
background: color(var(--red) lightness(-10%));
2015-05-16 14:43:12 +03:00
color: #fff;
2015-05-15 23:18:24 +03:00
}
/* Link button
/* ---------------------------------------------------------- */
/* For styling a button like a link */
.btn-link {
2015-05-14 16:45:37 +03:00
border-color: transparent;
2015-05-15 23:18:24 +03:00
background: transparent;
2015-05-16 14:43:12 +03:00
color: var(--blue);
2015-05-14 16:45:37 +03:00
}
.btn-link:hover,
2015-05-15 23:18:24 +03:00
.btn-link:active,
2015-05-14 16:45:37 +03:00
.btn-link:focus {
2015-05-15 23:18:24 +03:00
border-color: transparent;
background: transparent;
2015-05-16 14:43:12 +03:00
color: var(--blue);
text-decoration: underline;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
.btn-link.disabled,
.btn-link[disabled] {
2015-05-16 14:43:12 +03:00
box-shadow: none;
2015-05-15 23:18:24 +03:00
color: #b2b2b2;
opacity: 0.65;
2015-05-16 14:43:12 +03:00
cursor: not-allowed;
pointer-events: none;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
/* Minor button
2015-05-14 16:45:37 +03:00
/* ---------------------------------------------------------- */
2015-05-15 23:18:24 +03:00
/* For buttons with a small/insignificant action for
// example a "cancel" button. Style is de-emphasised. */
2015-05-14 16:45:37 +03:00
.btn-minor {
2015-05-16 14:43:12 +03:00
padding: 8px 15px;
2015-05-14 16:45:37 +03:00
text-transform: none;
letter-spacing: 0;
font-size: 1.2rem;
2015-05-15 23:18:24 +03:00
}
.btn-minor:hover,
.btn-minor:active,
.btn-minor:focus {
border-color: #c1c1c1;
background: #fff;
box-shadow: none;
color: #808284;
2015-05-14 16:45:37 +03:00
}
2015-05-15 23:18:24 +03:00
/* Button size variations
2015-05-14 16:45:37 +03:00
/* ---------------------------------------------------------- */
.btn-lg {
padding: 12px 18px;
2015-05-16 14:43:12 +03:00
border-radius: 4px;
2015-05-14 16:45:37 +03:00
font-size: 1.4rem;
line-height: 1.33;
}
.btn-sm {
padding: 7px 10px;
2015-05-16 14:43:12 +03:00
border-radius: 2px;
2015-05-14 16:45:37 +03:00
font-size: 1rem;
line-height: 1.5;
}
.btn-block {
display: block;
width: 100%;
}
2015-05-15 23:18:24 +03:00
/* Vertically space out multiple block buttons */
2015-05-14 16:45:37 +03:00
.btn-block + .btn-block {
margin-top: 5px;
}
2015-05-15 23:18:24 +03:00
/* Specificity overrides */
2015-05-14 16:45:37 +03:00
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
/* Spin Buttons!
/* ---------------------------------------------------------- */
.spinner {
position: relative;
display: inline-block;
box-sizing: border-box;
margin: -2px 0;
width: 14px;
height: 14px;
border: rgba(0,0,0,0.2) solid 4px;
border-radius: 100px;
animation: spin 1s linear infinite;
}
.spinner:before {
content: "";
display: block;
margin-top: 6px;
width: 4px;
height: 4px;
background: rgba(0,0,0,0.6);
border-radius: 100px;
}