sass-site/source/assets/sass/components/_buttons.scss

50 lines
1.0 KiB
SCSS
Raw Normal View History

2023-01-12 20:54:24 +01:00
@use 'sass:color';
@use '../functions';
@use '../visual-design/theme';
@use '../config/color/brand';
2023-01-12 19:19:42 +01:00
2023-01-06 22:40:29 +01:00
.sl-c-button {
display: inline-flex;
align-items: center;
justify-content: center;
margin: 0;
border: 0 {
2023-01-12 20:54:24 +01:00
/* stylelint-disable-next-line property-no-unknown */
radius: functions.sl-px-to-rem(4px);
2023-01-09 20:10:02 +01:00
}
2023-01-31 07:13:57 +01:00
padding: var(--gutter-minus) var(--gutter);
background: var(--color-button-bg, var(--sl-color-iron));
box-shadow: 0 2px 1px var(--shadow);
color: var(--color-button-text, var(--highlight));
2023-01-06 22:40:29 +01:00
cursor: pointer;
&:hover,
2023-01-09 20:10:02 +01:00
&:focus {
--color-button-text: var(--action);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
&:active {
--color-button-text: color.adjust(brand.$sl-color--venus, $lightness: -10%);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
&--primary {
--color-button-bg: var(--highlight);
2023-01-06 22:40:29 +01:00
&,
&:hover,
&:focus,
2023-01-09 20:10:02 +01:00
&:active {
--color-button-text: var(--sl-color--white);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
&:hover,
2023-01-09 20:10:02 +01:00
&:focus {
background-color: var(--action);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
&:active {
background-color: color.adjust(brand.$sl-color--venus, $lightness: -10%);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
}