More actions
No edit summary |
don't try to make it line up, it's not worth it |
||
(8 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
.hierarchy-tree .__item { | .hierarchy-tree .__item { | ||
position: relative; /* absolute positioning target */ | position: relative; /* absolute positioning target */ | ||
display: grid; | |||
grid-template-columns: max-content 1fr; | |||
grid-template-areas: "emoji content"; | |||
align-items: center; | |||
gap: 6px; | |||
} | |||
.hierarchy-tree .__item > .emoji { | |||
grid-area: emoji; | |||
} | |||
.hierarchy-tree .__item > .__content { | |||
grid-area: content; | |||
} | |||
.hierarchy-tree .hierarchy-tree .__item::after { | |||
position: absolute; | |||
top: 50%; | |||
left: -16px; | |||
width: 12px; | |||
height: 2px; | |||
display: block; | |||
content: ""; | |||
background-color: var(--color-subtle, #909090); | |||
} | } | ||
.hierarchy-tree > .-tree-indent { | .hierarchy-tree > .-tree-indent { | ||
Line 12: | Line 33: | ||
} | } | ||
.hierarchy-tree > .-tree-indent::after { | .hierarchy-tree > .-tree-indent::after { | ||
left: | left: 6px; | ||
width: 2px; | width: 2px; | ||
top: | top: 2px; | ||
bottom: 0; | bottom: calc(0.5em - 2px); | ||
display: block; | display: block; | ||
position: absolute; | |||
content: ""; | content: ""; | ||
background-color: var(--color- | background-color: var(--color-subtle, #909090); | ||
} | } |
Latest revision as of 03:39, 14 December 2024
.hierarchy-tree {
display: flex;
flex-flow: column nowrap;
height: max-content;
}
.hierarchy-tree .__item {
position: relative; /* absolute positioning target */
display: grid;
grid-template-columns: max-content 1fr;
grid-template-areas: "emoji content";
align-items: center;
gap: 6px;
}
.hierarchy-tree .__item > .emoji {
grid-area: emoji;
}
.hierarchy-tree .__item > .__content {
grid-area: content;
}
.hierarchy-tree .hierarchy-tree .__item::after {
position: absolute;
top: 50%;
left: -16px;
width: 12px;
height: 2px;
display: block;
content: "";
background-color: var(--color-subtle, #909090);
}
.hierarchy-tree > .-tree-indent {
padding-left: 24px;
position: relative;
}
.hierarchy-tree > .-tree-indent::after {
left: 6px;
width: 2px;
top: 2px;
bottom: calc(0.5em - 2px);
display: block;
position: absolute;
content: "";
background-color: var(--color-subtle, #909090);
}