Files
FixIt/assets/scss/content/shortcodes/_file-tree.scss
T
Cell 20c0997cc5 fix(assets): restructure SCSS pages directory and fix positioning issues
- Restructure SCSS pages directory and rename shared to content
- Ensure hr overflow visible for awesome-hr icon
- Restore position relative on .page for absolute children
2026-07-16 00:13:35 +08:00

109 lines
2.2 KiB
SCSS

@use "core/functions" as *;
@use "core/mixins" as *;
.single .file-tree-wrapper {
border: 1px solid fi-var(global-border-color);
padding: 0.5rem;
font-size: 0.8rem;
line-height: 1;
margin-block: 0.5rem;
transition: box-shadow 0.2s ease;
@include border-radius;
&:hover {
box-shadow: 0 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}
ul.file-tree {
list-style: none;
margin: 0;
padding: 0;
.file-tree-item {
position: relative;
&.file-tree-folder {
> .file-tree-toggle {
cursor: pointer;
@include bold-dark;
&:hover {
i,
span {
opacity: 0.6;
}
}
}
}
.file-tree-label {
display: inline-flex;
align-items: center;
position: relative;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
transition: all 0.15s ease;
@include border-radius;
.file-tree-icon {
width: 1rem;
text-align: center;
flex-shrink: 0;
}
.file-tree-label__inner {
word-break: break-all;
}
&.is-highlighted {
color: fi-var(global-link-hover-color);
}
}
}
&:not([data-level='0']) {
.file-tree-item {
margin: 0.25rem 0;
padding-left: 0.25rem;
.file-tree-label::before {
content: "";
position: absolute;
top: 50%;
left: -0.5rem;
translate: 0 -50%;
width: 0.75rem;
height: 1px;
background-color: fi-var(global-font-secondary-color);
}
}
}
}
.file-tree .file-tree {
padding-left: 1.25rem;
position: relative;
&::before {
content: "";
position: absolute;
top: -0.25rem;
bottom: 0.625rem;
left: calc(1rem - 0.5px);
width: 1px;
background-color: fi-var(global-font-secondary-color);
height: fi-var(file-tree-line-height);
}
}
.file-tree-item.is-collapsed {
> .file-tree {
display: none;
}
> .file-tree-label .file-tree-icon::before {
--fa: '\f07b';
}
}
}