mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
133 lines
3.2 KiB
CSS
133 lines
3.2 KiB
CSS
/*! Buttons */
|
|
:root {
|
|
--button-font-family: var(--input-font-family);
|
|
--button-font-weight: var(--input-font-weight);
|
|
--button-font-size: var(--input-font-size);
|
|
--button-font-size-small: var(--input-font-size-small);
|
|
--button-font-size-big: var(--input-font-size-big);
|
|
--button-color: var(--color-white);
|
|
--button-bg-color: var(--state-primary);
|
|
--button-height: var(--input-height);
|
|
--button-height-small: var(--input-height-small);
|
|
--button-height-big: var(--input-height-big);
|
|
--button-border-radius: var(--component-border-radius);
|
|
--button-box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .1);
|
|
--button-box-shadow-hover: inset 0 2px 5rem rgba(0, 0, 0, .1), inset 0 -2px 0 rgba(0, 0, 0, .1);
|
|
--button-box-shadow-active: inset 0 2px 5rem rgba(0, 0, 0, .1), inset 0 2px 0 rgba(0, 0, 0, .1);
|
|
}
|
|
|
|
button,
|
|
.button {
|
|
font-family: var(--button-font-family);
|
|
font-size: var(--button-font-size);
|
|
font-weight: var(--button-font-weight);
|
|
text-align: center;
|
|
text-decoration: none;
|
|
color: var(--button-color);
|
|
background-color: var(--button-bg-color);
|
|
border-radius: var(--button-border-radius);
|
|
border: none;
|
|
height: var(--button-height);
|
|
line-height: var(--button-height);
|
|
user-select: none;
|
|
vertical-align: middle;
|
|
white-space: nowrap;
|
|
padding: 0 .75em; /* ems for relative sizing */
|
|
box-shadow: var(--button-box-shadow);
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
transition: .1s box-shadow, .1s background-color, .1s color;
|
|
}
|
|
|
|
.button-small {
|
|
font-size: var(--button-font-size-small);
|
|
height: var(--button-height-small);
|
|
line-height: var(--button-height-small);
|
|
}
|
|
|
|
.button-big {
|
|
font-size: var(--button-font-size-big);
|
|
height: var(--button-height-big);
|
|
line-height: var(--button-height-big);
|
|
}
|
|
|
|
.button-block {
|
|
width: 100% !important;
|
|
display: block;
|
|
}
|
|
|
|
.button-link {
|
|
background-color: transparent;
|
|
color: var(--link-color);
|
|
text-decoration: var(--link-text-decoration);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.button-link:hover:not(:disabled) {
|
|
background-color: transparent;
|
|
color: var(--link-color-hover);
|
|
text-decoration: var(--link-text-decoration-hover);
|
|
box-shadow: none;
|
|
}
|
|
|
|
button:hover,
|
|
a.button:hover {
|
|
color: var(--button-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
button:hover:not(:disabled) {
|
|
color: var(--button-color);
|
|
box-shadow: var(--button-box-shadow-hover);
|
|
}
|
|
|
|
button:active:not(.button-link):not(:disabled),
|
|
button.active:not(.button-link):not(:disabled),
|
|
a.button.active:not(.button-link) {
|
|
box-shadow: var(--button-box-shadow-active);
|
|
}
|
|
|
|
button:disabled {
|
|
opacity: .5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
label.button input[type="file"] {
|
|
display: none;
|
|
}
|
|
|
|
/* Variations */
|
|
.button-secondary {
|
|
background-color: var(--state-secondary);
|
|
}
|
|
|
|
.button-success {
|
|
background-color: var(--state-success);
|
|
}
|
|
|
|
.button-info {
|
|
background-color: var(--state-info);
|
|
}
|
|
|
|
.button-warning {
|
|
background-color: var(--state-warning);
|
|
}
|
|
|
|
.button-danger {
|
|
background-color: var(--state-danger);
|
|
}
|
|
|
|
.button-light,
|
|
button.button-light:hover:not(:disabled),
|
|
a.button-light:hover {
|
|
color: var(--state-dark);
|
|
background-color: var(--state-light);
|
|
}
|
|
|
|
.button-dark,
|
|
button.button-dark:hover:not(:disabled),
|
|
a.button-dark {
|
|
color: var(--state-light);
|
|
background-color: var(--state-dark);
|
|
}
|