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

73 lines
1.3 KiB
SCSS
Raw Normal View History

.admonition {
position: relative;
2020-04-27 19:38:22 +02:00
margin: 1rem 0;
padding: 0 .75rem;
border-left: .25rem solid;
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;
}
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;
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;
}
@each $type, $color, $background-color in $admonition-color-list {
@if $type == "note" {
background-color: $background-color;
2020-02-02 14:07:38 +01:00
border-left-color: $color;
.admonition-title {
border-bottom-color: $background-color;
background-color: opacify($background-color, 0.15);
}
&.open .admonition-title {
background-color: $background-color;
}
2020-02-02 14:07:38 +01:00
i.icon {
color: $color;
}
} @else {
&.#{$type} {
background-color: $background-color;
border-left-color: $color;
.admonition-title {
border-bottom-color: $background-color;
background-color: opacify($background-color, 0.15);
}
&.open .admonition-title {
background-color: $background-color;
}
i.icon {
color: $color;
}
}
}
}
&:last-child {
margin-bottom: .75rem;
}
}