MinimalistFlex/css/autoh2label.css
2024-08-20 07:44:34 +08:00

31 lines
677 B
CSS

:root {
counter-reset: headings;
}
.singular-main h2 {
position: relative;
counter-increment: headings;
}
.singular-main h2::before {
content: counter(headings);
display: inline-flex;
justify-content: center;
align-items: center;
width: 2em;
height: 2em;
background-color: var(--minimalistflex-tint);
color: var(--minimalistflex-contrast);
margin-right: 12px;
}
.singular-main h2::after {
content: "";
display: block;
position: absolute;
bottom: 0;
right: 0;
width: calc(100% - 2em);
height: 4px;
background: linear-gradient(90deg, var(--minimalistflex-tint), var(--minimalistflex-tint-alt));
}