ds4/src/scss/components/_item_list.scss

108 lines
2.5 KiB
SCSS
Raw Normal View History

2021-02-24 12:55:30 +01:00
@use "../utils/mixins";
@use "../utils/variables";
.ds4-item-list {
2021-02-26 03:17:27 +01:00
@include mixins.mark-invalid-or-disabled-input;
$row-height: 1.75em;
2021-02-26 03:17:27 +01:00
align-items: center;
display: grid;
grid-column-gap: 0.5em;
grid-row-gap: 0.2em;
2021-02-26 02:13:18 +01:00
margin: 0.5em 0;
overflow-y: auto;
2021-02-26 03:17:27 +01:00
padding: 0;
&--weapon {
grid-template-columns: $row-height $row-height 3ch 3fr $row-height 1fr 3ch 5fr 5ch;
}
&--armor {
grid-template-columns: $row-height $row-height 3ch 3fr 1fr 1fr 3ch 5fr 5ch;
}
&--shield {
grid-template-columns: $row-height $row-height 3ch 1fr 3ch 3fr 5ch;
}
&--equipment {
grid-template-columns: $row-height $row-height 3ch 1fr 10ch 3fr 5ch;
}
&--loot {
grid-template-columns: $row-height 3ch 1fr 10ch 3fr 5ch;
}
&--spell {
grid-template-columns: $row-height $row-height 2fr $row-height 1fr 1fr 1fr 1fr 5ch;
}
2021-02-25 22:22:05 +01:00
&--talent {
grid-template-columns: $row-height 1fr 1fr 3fr 5ch;
2021-02-25 22:22:05 +01:00
}
&--racial-ability,
&--language,
&--alphabet,
&--special-creature-ability {
grid-template-columns: $row-height 1fr 3fr 5ch;
2021-02-25 22:22:05 +01:00
}
&__row {
display: contents; // TODO: Once chromium supports `grid-template-columns: subgrid` (https://bugs.chromium.org/p/chromium/issues/detail?id=618969), switch to `display: grid; grid: 1/-1; grid-template-columns: subgrid`
&--header {
font-weight: bold;
}
> * {
height: $row-height;
line-height: $row-height;
white-space: nowrap;
overflow-y: hidden;
}
}
2021-02-26 03:17:27 +01:00
&__image {
border: none;
2021-02-26 03:17:27 +01:00
}
&__editable {
2021-02-26 03:17:27 +01:00
background-color: transparent;
border: 0;
padding: 0;
2021-02-26 03:17:27 +01:00
&--checkbox {
width: 100%;
height: 100%;
margin: 0px;
}
}
&__description {
overflow: hidden;
text-overflow: ellipsis;
2021-02-26 03:17:27 +01:00
:not(:first-child) {
display: none;
}
2021-02-26 03:17:27 +01:00
> * {
font-size: 0.75em;
margin: 0;
2021-02-26 03:17:27 +01:00
overflow: hidden;
text-overflow: ellipsis;
}
}
&__control-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
text-align: center;
width: 100%;
padding: 0 calc(1em / 3);
}
}
.ds4-item-list-title {
2021-02-24 12:55:30 +01:00
border-bottom: variables.$border-groove;
font-weight: bold;
2021-02-26 03:17:27 +01:00
margin-bottom: 0;
margin-top: 1em;
padding-left: 1em;
}