Implement the Attribute sheet for editing

This commit is contained in:
Oliver 2026-04-25 19:30:38 -06:00
parent 599789ec13
commit e8c73de6bd
8 changed files with 242 additions and 0 deletions

View file

@ -0,0 +1,56 @@
.taf.AttributeItemSheet {
min-width: 300px;
> .window-content {
padding: 0;
color: var(--attribute-sheet-colour);
background: var(--attribute-sheet-background);
}
.sheet-header {
padding: 0.5rem;
border-bottom: 1px solid var(--attribute-sheet-divider-colour);
}
.value-controls {
display: grid;
align-items: center;
grid-auto-flow: column;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, auto);
gap: 2px 4px;
padding: 0 8px;
}
.property {
display: grid;
align-items: center;
justify-items: left;
grid-template-columns: 2fr 1fr;
gap: 2px 8px;
margin: 0 8px 8px;
.hint {
grid-column: 1 / -1;
margin: 0;
color: var(--attribute-sheet-hint-colour);
}
}
input {
color: var(--attribute-sheet-input-colour);
background: var(--attribute-sheet-input-background);
&:disabled {
color: var(--attribute-sheet-disabled-input-colour);
cursor: not-allowed;
}
}
taf-toggle {
--toggle-background: var(--attribute-sheet-input-background);
--slider-checked-colour: var(--attribute-sheet-toggle-slider-enabled-colour);
--slider-unchecked-colour: var(--attribute-sheet-toggle-slider-disabled-colour);
justify-self: right;
}
}

View file

@ -26,6 +26,7 @@
/* Apps */
@import url("./Apps/common.css") layer(apps);
@import url("./Apps/Ask.css") layer(apps);
@import url("./Apps/AttributeItemSheet.css") layer(apps);
@import url("./Apps/AttributeManager.css") layer(apps);
@import url("./Apps/GenericItemSheet.css") layer(apps);
@import url("./Apps/PlayerSheet.css") layer(apps);

View file

@ -50,6 +50,17 @@
--item-sheet-description-menu-background: var(--steel-700);
--item-sheet-description-content-background: var(--steel-650);
/* Attribute Sheet Variables */
--attribute-sheet-colour: var(--item-sheet-colour);
--attribute-sheet-background: var(--item-sheet-background);
--attribute-sheet-divider-colour: var(--item-sheet-divider);
--attribute-sheet-hint-colour: var(--steel-250);
--attribute-sheet-input-colour: var(--item-sheet-input-colour);
--attribute-sheet-input-background: var(--item-sheet-input-background);
--attribute-sheet-disabled-input-colour: var(--steel-350);
--attribute-sheet-toggle-slider-enabled-colour: var(--item-sheet-toggle-slider-enabled-colour);
--attribute-sheet-toggle-slider-disabled-colour: var(--item-sheet-toggle-slider-disabled-colour);
/* Chip Variables */
--chip-colour: #fff7ed;
--chip-background: #2b3642;