UNPKG

sly-svelte-file-tree

Version:

A customizable file tree view component for Svelte

90 lines (83 loc) 2.31 kB
:root { --sly-color-control: rgba(0, 110, 172, 0.2); --sly-color-content: inherit; --sly-color-no-content: transparent; --sly-color-hover: rgba(0, 110, 172, 0.2); --sly-color-select: light; --sly-color-on-content: inherit; --sly-color-on-hover: rgba(0, 110, 172, 1); --sly-color-on-select: rgba(0, 110, 172, 1); --sly-color-metadata: rgba(75, 218, 237, 0.6); --sly-color-on-metadata: white; --sly-color-header: transparent; --sly-color-on-header: inherit; --sly-color-header-control: var(--sly-color-control); --sly-item-indentation: 12px; --sly-item-cell-gap: 8px; --sly-tree-metadata-columns-calc: repeat(auto-fill, minmax(0, auto)); --sly-tree-metadata-columns: repeat(auto-fill, minmax(0, auto)); --sly-scrollbar-width: 8px; --sly-tree-item-transition: 150ms 0ms ease-out all; } .sly-file-tree { position: relative; width: 100%; height: 100%; display: flex; justify-content: start; align-items: start; flex-direction: column; } .sly-file-tree-loading, .sly-file-tree-empty-list { justify-content: center; align-items: center; } .sly-file-tree-header { position: relative; width: 100%; height: auto; display: flex; justify-content: space-between; align-items: center; flex-direction: row; background: var(--sly-color-header); border-bottom: 1px solid var(--sly-color-header-control); padding: 6px calc(12px + var(--sly-scrollbar-width) + var(--sly-item-cell-gap)) 6px 12px; color: var(--sly-color-on-header); } .sly-file-tree-inner { position: relative; display: flex; justify-content: start; align-items: start; width: 100%; height: 100%; overflow-y: scroll; overflow-x: hidden; } .sly-file-tree-files { position: relative; display: flex; justify-content: start; align-items: center; width: 100%; height: auto; } .sly-file-tree-files > ul, .sly-file-tree-files > ul > li { position: relative; width: 100%; height: 100%; list-style: none; padding: 0; margin: 0; color: var(--sly-color-on-content); } .sly-file-tree-last-item { position: relative; display: flex; justify-content: start; align-items: center; width: 100%; height: auto; }