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

67 lines
1.2 KiB
SCSS
Raw Normal View History

2023-01-12 20:54:24 +01:00
@use 'sass:color';
@use '../functions';
@use '../config/color/brand';
2023-01-12 20:54:24 +01:00
@use '../visual-design/typography';
2023-01-12 19:19:42 +01:00
2023-01-06 22:40:29 +01:00
.sl-c-alert {
2023-02-22 17:42:04 +01:00
background: var(--alert-bg, var(--sl-color--highlight));
color: var(--sl-color--white);
font-size: var(--sl-font-size--small);
2023-02-02 21:13:17 +01:00
2023-03-08 19:59:44 +01:00
padding-bottom: var(--alert-padding-block, var(--sl-gutter--minus));
padding-top: var(--alert-padding-block, var(--sl-gutter--minus));
2023-02-02 21:13:17 +01:00
2023-01-31 07:13:57 +01:00
text-align: var(--alert-align, center);
2023-01-06 22:40:29 +01:00
p,
ul,
dl {
2023-01-09 20:10:02 +01:00
&:first-child {
margin-top: 0;
}
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
&:last-child {
margin-bottom: 0;
}
2023-01-06 22:40:29 +01:00
}
p,
li,
2023-01-09 20:10:02 +01:00
dd {
max-width: none;
}
2023-01-06 22:40:29 +01:00
a {
border-bottom-color: rgba(
brand.$sl-color--white,
var(--opacity-border, 0.5)
);
color: var(--sl-color--white);
2023-01-31 07:13:57 +01:00
font-weight: typography.$sl-font-weight--bold;
2023-01-06 22:40:29 +01:00
&:hover,
&:focus {
2023-02-22 18:21:22 +01:00
--color-link-bg: rgba(0, 0, 0, 6.25%);
--opacity-border: 0.75;
2023-01-06 22:40:29 +01:00
}
2023-01-09 20:10:02 +01:00
&:active {
--opacity-border: 1;
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
2023-01-31 07:13:57 +01:00
}
2023-01-06 22:40:29 +01:00
2023-01-31 07:13:57 +01:00
.sl-c-alert--info {
--alert-bg: var(--sl-color--midnight-blue);
2023-01-31 07:13:57 +01:00
}
.sl-c-alert--special {
2023-01-31 16:53:34 +01:00
--alert-align: left;
2023-01-31 17:13:51 +01:00
--alert-bg: black;
--alert-padding-block: var(--sl-gutter--triple);
2023-01-06 22:40:29 +01:00
}
.sl-c-alert-title {
margin-top: 0;
}