Files
com.xaymar.www/_sass/_block-alert.scss
T

86 lines
1.7 KiB
SCSS
Raw Normal View History

2024-05-16 11:40:24 +02:00
alert.block {
position: relative;
display: block;
2024-05-16 12:00:42 +02:00
margin: .5em;
2024-05-16 11:40:24 +02:00
margin-left: 1.5em;
margin-right: 1.5em;
2024-05-16 12:00:42 +02:00
padding: .5em;
2024-05-16 11:40:24 +02:00
padding-left: 4em;
min-height: 4em;
2024-05-16 12:00:42 +02:00
border: 2px solid hsl($theme-hue 30% 40%);
border-radius: 0.2rem;
2024-05-16 11:40:24 +02:00
background: hsl($theme-hue 20% 30%);
2024-05-16 12:00:42 +02:00
box-shadow: 0px 0px 2px 2px rgb(0, 0, 0);
2024-05-16 11:40:24 +02:00
overflow: hidden;
}
alert::before {
2024-05-16 12:00:42 +02:00
content: "";
2024-05-16 11:40:24 +02:00
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
display: block;
min-width: 4rem;
min-height: 4rem;
2024-05-16 12:00:42 +02:00
font-size: 3rem;
2024-05-16 11:40:24 +02:00
white-space: no-wrap;
text-align: center;
2024-05-16 12:00:42 +02:00
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
2024-05-16 11:40:24 +02:00
}
2024-05-16 12:00:42 +02:00
alert.block[data-type*="good"] {
border-color: oklch(75.52% 0.1158 150.35);
background: oklch(54.45% 0.1158 150.35);
}
alert[data-type*="good"]::before {
content: "👍";
}
alert.block[data-type*="bad"] {
border-color: oklch(62.8% 0.2568 29.234);
background: oklch(52.37% 0.1576 29.234);
}
alert[data-type*="bad"]::before {
content: "👎";
}
alert.block[data-type*="hint"] {
border-color: oklch(69.41% 0.138 238.24);
background: oklch(49.11% 0.0785 238.24);
}
alert[data-type*="hint"]::before {
2024-05-16 11:40:24 +02:00
content: "";
}
2024-05-16 12:00:42 +02:00
alert.block[data-type*="notice"] {
border-color: oklch(69.41% 0.138 238.24);
background: oklch(49.11% 0.0785 238.24);
}
alert[data-type*="notice"]::before {
content: "🔍";
}
alert.block[data-type*="warning"] {
border-color: oklch(71.76% 0.187 49.76);
background: oklch(52.65% 0.113 49.76);
}
alert[data-type*="warning"]::before {
2024-05-16 11:40:24 +02:00
content: "";
}
2024-05-16 12:00:42 +02:00
alert.block[data-type*="error"] {
border-color: oklch(62.8% 0.2568 29.234);
background: oklch(52.37% 0.1576 29.234);
2024-05-16 11:40:24 +02:00
}
2024-05-16 12:00:42 +02:00
alert[data-type*="error"]::before {
content: "";
}