grav-theme-future2021/assets/sass/components/_button.scss
2024-08-11 22:45:20 +02:00

165 lines
No EOL
3.3 KiB
SCSS

///
/// Future Imperfect by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Button */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
@include vendor('appearance', 'none');
@include vendor('transition', (
'background-color #{_duration(transition)} ease',
'box-shadow #{_duration(transition)} ease',
'color #{_duration(transition)} ease'
));
background-color: transparent;
border: 0;
box-shadow: inset 0 0 0 1px _palette(border);
color: _palette(fg-bold) !important;
cursor: pointer;
display: inline-block;
font-family: _font(family-heading);
font-size: 0.6em;
font-weight: _font(weight-heading-bold);
height: auto;
letter-spacing: _font(kerning-heading);
line-height: _size(element-height) * 1.5;
padding: 0 2.5em;
text-align: center;
text-decoration: none;
text-transform: uppercase;
white-space: normal;
&:hover {
box-shadow: inset 0 0 0 1px _palette(accent);
color: _palette(accent) !important;
&:active {
background-color: transparentize(_palette(accent), 0.95);
}
}
&:before, &:after {
color: _palette(fg-light);
position: relative;
}
&:before {
left: -1em;
padding: 0 0 0 0.75em;
}
&:after {
left: 1em;
padding: 0 0.75em 0 0;
}
&.fit {
width: 100%;
}
&.large {
font-size: 0.7em;
padding: 0 3em;
}
&.small {
font-size: 0.5em;
}
&.primary {
background-color: _palette(accent);
box-shadow: none;
color: _palette(bg) !important;
&:hover {
background-color: lighten(_palette(accent), 3);
}
&:active {
background-color: darken(_palette(accent), 3);
}
}
&.secondary {
background-color: _palette(secondary);
box-shadow: none;
color: _palette(bg) !important;
&:hover {
background-color: lighten(_palette(secondary), 3);
}
&:active {
background-color: darken(_palette(secondary), 3);
}
}
&.success {
background-color: _palette(success);
box-shadow: none;
color: _palette(bg) !important;
&:hover {
background-color: lighten(_palette(success), 3);
}
&:active {
background-color: darken(_palette(success), 3);
}
}
&.info {
background-color: _palette(info);
box-shadow: none;
color: _palette(bg) !important;
&:hover {
background-color: lighten(_palette(info), 3);
}
&:active {
background-color: darken(_palette(info), 3);
}
}
&.warning {
background-color: _palette(warning);
box-shadow: none;
color: _palette(fg-bold) !important;
&:hover {
background-color: lighten(_palette(warning), 3);
}
&:active {
background-color: darken(_palette(warning), 3);
}
}
&.danger {
background-color: _palette(danger);
box-shadow: none;
color: _palette(bg) !important;
&:hover {
background-color: lighten(_palette(danger), 3);
}
&:active {
background-color: darken(_palette(danger), 3);
}
}
&.disabled,
&:disabled {
@include vendor('pointer-events', 'none');
color: _palette(border) !important;
&:before {
color: _palette(border) !important;
}
}
}