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

47 lines
984 B
SCSS
Raw Normal View History

2023-01-12 20:54:24 +01:00
@use 'sass:color';
@use '../functions';
2023-01-12 19:19:42 +01:00
2023-01-06 22:40:29 +01:00
.sl-c-button {
align-items: center;
2023-02-21 20:19:09 +01:00
border: 0;
border-radius: var(--sl-border-radius--large);
2023-02-20 20:47:56 +01:00
background: var(--color-button-bg, var(--sl-color--iron));
2023-02-22 17:42:04 +01:00
box-shadow: 0 2px 1px var(--sl-color--shadow);
color: var(--color-button-text, var(--sl-color--highlight));
2023-01-06 22:40:29 +01:00
cursor: pointer;
display: inline-flex;
justify-content: center;
margin: 0;
padding: var(--sl-gutter--minus) var(--sl-gutter);
2023-01-06 22:40:29 +01:00
&:hover,
2023-01-09 20:10:02 +01:00
&:focus {
2023-02-22 17:42:04 +01:00
--color-button-text: var(--sl-color--action);
--color-button-bg: var(--sl-color-link--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 {
2023-02-22 17:42:04 +01:00
--color-button-text: var(--sl-color--active);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
&--primary {
2023-02-22 17:42:04 +01:00
--color-button-bg: var(--sl-color--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 {
2023-02-22 17:42:04 +01:00
--color-button-bg: var(--sl-color--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 {
2023-02-22 17:42:04 +01:00
--color-button-bg: var(--sl-color--active);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
}