LoveIt/assets/css/_partial/_single/_admonition.scss

68 lines
1.4 KiB
SCSS
Raw Normal View History

.admonition {
position: relative;
2020-04-27 19:38:22 +02:00
margin: 1rem 0;
padding: 0 .75rem;
2020-02-02 14:07:38 +01:00
background-color: map-get($admonition-background-color-map, 'note');
border-left: .25rem solid map-get($admonition-color-map, 'note');
overflow: auto;
.admonition-title {
2020-04-27 19:38:22 +02:00
font-weight: bold;
margin: 0 -0.75rem;
2020-04-27 19:38:22 +02:00
padding: .25rem 1.8rem;
border-bottom: 1px solid map-get($admonition-background-color-map, 'note');
2020-04-27 19:38:22 +02:00
background-color: opacify(map-get($admonition-background-color-map, 'note'), 0.15);
}
2020-04-27 19:38:22 +02:00
&.open .admonition-title {
background-color: map-get($admonition-background-color-map, 'note');
}
2020-02-21 16:42:35 +01:00
.admonition-content {
padding: .5rem 0;
2020-02-21 16:42:35 +01:00
}
i.icon {
font-size: 0.85rem;
2020-02-02 14:07:38 +01:00
color: map-get($admonition-color-map, 'note');
position: absolute;
top: .6rem;
2020-04-27 19:38:22 +02:00
left: .4rem;
}
i.details-icon {
position: absolute;
2020-04-27 19:38:22 +02:00
top: .6rem;
right: .3rem;
}
2020-02-02 14:07:38 +01:00
@each $type, $color in $admonition-color-map {
&.#{$type} {
border-left-color: $color;
2020-02-02 14:07:38 +01:00
i.icon {
color: $color;
}
}
}
2020-02-02 14:07:38 +01:00
@each $type, $color in $admonition-background-color-map {
&.#{$type} {
background-color: $color;
2020-02-02 14:07:38 +01:00
.admonition-title {
border-bottom-color: $color;
2020-04-27 19:38:22 +02:00
background-color: opacify($color, 0.15);
2020-02-02 14:07:38 +01:00
}
2020-04-27 19:38:22 +02:00
&.open .admonition-title {
background-color: $color;
}
}
}
&:last-child {
margin-bottom: .75rem;
}
}