Make the attribute tab use a two-column layout for the lists

This commit is contained in:
Oliver 2026-04-25 20:49:00 -06:00
parent edceb5b384
commit e30a7f9156
2 changed files with 15 additions and 2 deletions

View file

@ -97,6 +97,11 @@
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
&.two-col {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
} }
.item { .item {
@ -181,6 +186,7 @@
background: var(--attribute-background); background: var(--attribute-background);
color: var(--attribute-colour); color: var(--attribute-colour);
padding: 4px; padding: 4px;
margin: 0;
.name { .name {
font-size: 1.1rem; font-size: 1.1rem;
@ -200,9 +206,16 @@
} }
} }
&:last-child { &:last-child:nth-child(odd) {
grid-column: 1 / -1;
border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px;
} }
&:nth-last-child(2):has( + &:nth-child(even)) {
border-radius: 0 0 0 6px;
}
&:last-child:nth-child(even) {
border-radius: 0 0 6px 0;
}
} }
.content { .content {

View file

@ -10,7 +10,7 @@
{{ group.name }} {{ group.name }}
</h3> </h3>
</div> </div>
<ul class="embedded-list"> <ul class="embedded-list two-col">
{{#each group.attrs as |attr|}} {{#each group.attrs as |attr|}}
{{> (systemFilePath "templates/PlayerSheet/tabs/attributes/attribute.hbs") attr }} {{> (systemFilePath "templates/PlayerSheet/tabs/attributes/attribute.hbs") attr }}
{{/each}} {{/each}}