mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-23 10:46:13 +02:00
68 lines
1.2 KiB
CSS
68 lines
1.2 KiB
CSS
/**
|
|
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
|
|
* (c) 2019 - 2021 Nguyen Huu Phuoc <https://twitter.com/nghuuphuoc>
|
|
*/
|
|
|
|
.tree-diagram ul {
|
|
display: flex;
|
|
position: relative;
|
|
|
|
/* Reset */
|
|
list-style-type: none;
|
|
margin: 0;
|
|
padding: 1rem 0.5rem 0rem 0.5rem;
|
|
}
|
|
|
|
.tree-diagram ul ul::before {
|
|
border-right: 1px solid rgba(0, 0, 0, .3);
|
|
content: '';
|
|
height: 1rem;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 50%;
|
|
width: 50%;
|
|
}
|
|
|
|
.tree-diagram li {
|
|
padding: 1rem 0.5rem 0rem 0.5rem;
|
|
position: relative;
|
|
|
|
/* Center the content */
|
|
align-items: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.tree-diagram li::before {
|
|
border-right: 1px solid rgba(0, 0, 0, .3);
|
|
border-top: 1px solid rgba(0, 0, 0, .3);
|
|
content: '';
|
|
height: 1rem;
|
|
|
|
/* Position */
|
|
position: absolute;
|
|
top: 0;
|
|
right: 50%;
|
|
width: 50%;
|
|
}
|
|
|
|
.tree-diagram li::after {
|
|
border-top: 1px solid rgba(0, 0, 0, .3);
|
|
content: '';
|
|
|
|
/* Position */
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 50%;
|
|
}
|
|
|
|
.tree-diagram li:first-child::before,
|
|
.tree-diagram li:last-child::after {
|
|
border-top: none;
|
|
}
|
|
|
|
li.tree-diagram__root::before {
|
|
border-right: none;
|
|
}
|