demarches-normaliennes/app/assets/stylesheets/exports.scss

70 lines
1.2 KiB
SCSS
Raw Normal View History

2024-11-05 19:02:31 +01:00
@import 'constants';
2024-03-03 11:56:08 +01:00
.export-template-preview {
// From https://codepen.io/myramoki/pen/xZJjrr
.tree {
margin-left: 0;
}
.tree,
.tree ul {
padding: 0;
list-style: none;
position: relative;
}
.tree ul {
margin: 0 0 0 0.5em; // (indentation/2)
}
.tree:before,
.tree ul:before {
2024-11-05 19:02:31 +01:00
content: '';
2024-03-03 11:56:08 +01:00
display: block;
width: 0;
position: absolute;
top: 0;
bottom: 0;
left: 4px;
border-left: 1px dashed;
}
ul.tree:before {
border-left: none;
}
.tree li {
margin: 0;
padding: 0 1.5em; // indentation + .5em
line-height: 2em; // default list item's `line-height`
position: relative;
}
.tree > li {
padding-left: 0; // Don't indent first level
}
.tree li:before {
2024-11-05 19:02:31 +01:00
content: '';
2024-03-03 11:56:08 +01:00
display: block;
width: 10px; // same with indentation
height: 0;
border-top: 1px dashed;
margin-top: -1px; // border top width
position: absolute;
top: 1em; // (line-height/2)
left: 4px;
}
ul.tree > li:before {
border-top: none;
}
.tree li:last-child:before {
2024-11-05 19:02:31 +01:00
background: var(--background-alt-blue-france); // same with body background
2024-03-03 11:56:08 +01:00
height: auto;
top: 1em; // (line-height/2)
bottom: 0;
}
}