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

70 lines
1.1 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 {
background: var(--alert-bg, var(--highlight));
color: var(--sl-color--white);
2023-01-12 19:19:42 +01:00
font-size: typography.$sl-font-size--small;
2023-02-02 21:13:17 +01:00
padding: {
top: var(--alert-padding-block, var(--gutter-minus));
bottom: var(--alert-padding-block, var(--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-01-09 23:53:57 +01:00
background: rgba(black, 0.0625);
--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;
2023-01-31 16:53:34 +01:00
--alert-padding-block: var(--gutter-triple);
2023-01-06 22:40:29 +01:00
}
.sl-c-alert-title {
margin-top: 0;
}