Converting from sass to nested vanilla css with layers (#147)

This commit is contained in:
Fredrik Jonsson 2026-03-10 14:14:55 +01:00 • committed by GitHub
commit 57244c3f33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,54 @@
/* Lists with a straight left margin. */
@layer components {
.ul-straight-left {
display: table;
list-style: none;
padding: 0;
& > li {
display: table-row;
&::before {
padding-inline-end: var(--spacing-xs);
display: table-cell;
content: '\2981';
font-size: var(--fs-s);
}
}
}
.ol-straight-left {
display: table;
list-style: none;
padding: 0;
& > li {
display: table-row;
counter-increment: table-ol;
&::before {
padding-inline-end: var(--spacing-xs);
display: table-cell;
content: counter(table-ol) '.';
font-size: var(--fs-s);
text-align: end;
}
}
}
.ul-straight-left--off {
display: block;
list-style: inherit;
& > li {
display: list-item;
&::before {
content: '';
display: inline;
padding: inherit;
}
}
}
}