ds4/src/scss/components/_item_list.scss

94 lines
2 KiB
SCSS
Raw Normal View History

2021-02-24 12:55:30 +01:00
@use "../utils/mixins";
@use "../utils/variables";
.ds4-item-list {
$row-height: 1.75em;
display: grid;
grid-column-gap: 0.5em;
grid-row-gap: 0.2em;
align-items: center;
margin: 7px 0;
padding: 0;
overflow-y: auto;
transition: all 0.5s;
@include mixins.mark-invalid-or-disabled-input;
&--weapon {
grid-template-columns: $row-height $row-height 3ch 3fr $row-height 1fr 3ch 5fr 4ch;
}
&--armor {
grid-template-columns: $row-height $row-height 3ch 3fr 1fr 1fr 3ch 5fr 4ch;
}
&--shield {
grid-template-columns: $row-height $row-height 3ch 3fr 3ch 5fr 4ch;
}
&--equipment {
grid-template-columns: $row-height $row-height 3ch 3fr 10ch 5fr 4ch;
}
&--loot {
grid-template-columns: $row-height 3ch 3fr 10ch 5fr 4ch;
}
&--spell {
grid-template-columns: $row-height $row-height 2fr $row-height 1fr 1fr 1fr 1fr 4ch;
}
&__row {
grid-column: 1/-1;
display: grid;
grid-template-columns: subgrid;
&--header {
font-weight: bold;
}
> * {
height: $row-height;
line-height: $row-height;
white-space: nowrap;
}
}
&__editable {
border: 0;
padding: 0;
background-color: transparent;
&--checkbox {
width: 100%;
height: 100%;
margin: 0px;
}
}
&__image {
background-repeat: no-repeat;
background-size: 100%;
background-position: center;
}
&__description {
overflow: hidden;
text-overflow: ellipsis;
:not(:first-child) {
display: none;
}
> * {
font-size: 0.75em;
text-overflow: ellipsis;
overflow: hidden;
margin: 0;
}
}
}
.ds4-item-list-title {
margin-top: 1em;
margin-bottom: 0;
padding-left: 1em;
2021-02-24 12:55:30 +01:00
border-bottom: variables.$border-groove;
font-weight: bold;
}