CSS
This commit is contained in:
@@ -71,29 +71,31 @@
|
|||||||
{@const status = statusOf(node)}
|
{@const status = statusOf(node)}
|
||||||
<tr class:folder={node.isFolder}>
|
<tr class:folder={node.isFolder}>
|
||||||
<td class="name" style:--depth={depth}>
|
<td class="name" style:--depth={depth}>
|
||||||
{#if node.isFolder}
|
<div class="name-line">
|
||||||
<button
|
{#if node.isFolder}
|
||||||
type="button"
|
<button
|
||||||
class="twisty"
|
type="button"
|
||||||
aria-expanded={!collapsed.has(node.sourceId)}
|
class="twisty"
|
||||||
aria-label="{collapsed.has(node.sourceId) ? 'Expand' : 'Collapse'} {node.name}"
|
aria-expanded={!collapsed.has(node.sourceId)}
|
||||||
onclick={() => toggle(node.sourceId)}
|
aria-label="{collapsed.has(node.sourceId) ? 'Expand' : 'Collapse'} {node.name}"
|
||||||
>
|
onclick={() => toggle(node.sourceId)}
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4" /></svg>
|
>
|
||||||
</button>
|
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4" /></svg>
|
||||||
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
|
</button>
|
||||||
<path d="M1.5 3.5h5l1.5 1.5h6.5v8h-13z" />
|
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
|
||||||
</svg>
|
<path d="M1.5 3.5h5l1.5 1.5h6.5v8h-13z" />
|
||||||
{:else}
|
</svg>
|
||||||
<span class="twisty-spacer"></span>
|
{:else}
|
||||||
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
|
<span class="twisty-spacer"></span>
|
||||||
<path d="M3.5 1.5h6l3 3v10h-9z M9.5 1.5v3h3" />
|
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
|
||||||
</svg>
|
<path d="M3.5 1.5h6l3 3v10h-9z M9.5 1.5v3h3" />
|
||||||
{/if}
|
</svg>
|
||||||
<span title={node.error ?? undefined}>{node.name}</span>
|
{/if}
|
||||||
{#if node.problems > 0}
|
<span title={node.error ?? undefined}>{node.name}</span>
|
||||||
<span class="problems">{node.problems} failed inside</span>
|
{#if node.problems > 0}
|
||||||
{/if}
|
<span class="problems">{node.problems} failed inside</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><Badge {...status} /></td>
|
<td><Badge {...status} /></td>
|
||||||
<td class="small"><TimeAgo date={node.isFolder ? null : node.modifiedAt} empty="" /></td
|
<td class="small"><TimeAgo date={node.isFolder ? null : node.modifiedAt} empty="" /></td
|
||||||
@@ -118,12 +120,23 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Every row is one line, so cells centre on each other rather than sharing a baseline
|
||||||
|
(the arrow and icons have none). */
|
||||||
|
td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The cell stays a table cell so its height and border match the row; the flex layout
|
||||||
|
lives on the line inside it. */
|
||||||
.name {
|
.name {
|
||||||
|
padding-left: calc(0.5rem + var(--depth) * 1.25rem);
|
||||||
|
min-width: 18rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name-line {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.35rem;
|
gap: 0.35rem;
|
||||||
padding-left: calc(0.5rem + var(--depth) * 1.25rem);
|
|
||||||
min-width: 18rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder .name {
|
.folder .name {
|
||||||
|
|||||||
@@ -243,7 +243,8 @@ a {
|
|||||||
.register td {
|
.register td {
|
||||||
padding: 0.55rem 0.75rem;
|
padding: 0.55rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--rule);
|
border-bottom: 1px solid var(--rule);
|
||||||
vertical-align: top;
|
/* First lines line up across cells, whatever their size (badges, small text, wrapped text). */
|
||||||
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register tr:last-child td {
|
.register tr:last-child td {
|
||||||
|
|||||||
Reference in New Issue
Block a user