From c005b2eecbb279eda1b19ef0e55f21ff89e3942b Mon Sep 17 00:00:00 2001 From: LilLiteralist <104447108+LilLiteralist@users.noreply.github.com> Date: Sat, 14 Sep 2024 23:01:18 -0500 Subject: [PATCH] Small CSS and refactoring --- .../StarWarsSagaEdition.css | 45 ++++++++++++++- .../StarWarsSagaEdition.html | 57 +++++++++++++++++-- Star Wars Saga Edition/sheet.json | 2 +- Star Wars Saga Edition/translation.json | 1 + 4 files changed, 96 insertions(+), 9 deletions(-) diff --git a/Star Wars Saga Edition/StarWarsSagaEdition.css b/Star Wars Saga Edition/StarWarsSagaEdition.css index fa1b28d8a83..42848087ad5 100644 --- a/Star Wars Saga Edition/StarWarsSagaEdition.css +++ b/Star Wars Saga Edition/StarWarsSagaEdition.css @@ -33,6 +33,7 @@ input.tab::before, --header-bg-highlight: #333; --col1-bg:#a7a8aa; --col1-bg-2:#c6c7ca; + --col1-bg-2-highlight:#d7d8db; --header-text: #fff; --header-text-highlight: #b9b9b9; --clickable-highlight: #0004; @@ -182,6 +183,30 @@ input[type="number"]:hover { margin-top:4px; } +/* Bonuses and Penalties Grid */ +.bonuses-grid { + display:grid; + grid-template-columns: 1fr 1fr 3fr 2fr 5fr; + column-gap: 4px; + row-gap: 3px; +} + +.bonuses-header-grid { + grid-column-start: span 8; + display:flex; + grid-template-columns: 1fr 9fr 2fr; + column-gap: 4px; + row-gap: 3px; +} + +.bonuses-name { + grid-column:2/6; +} + +.bonuses-grid select { + width: auto; +} + /* Vitals Grid (HP, Threshold, Condition Track, Second Wind) */ .vitals-grid { display: grid; @@ -254,6 +279,7 @@ input[type="number"]:hover { grid-template-rows:auto; justify-content: center; grid-row-gap: 1px; + grid-column-gap: 2px; } .attacks-grid-attack-title.col1, @@ -263,15 +289,17 @@ input[type="number"]:hover { font-size: 13px; background-color:var(--col1-bg-2); cursor: pointer; - margin-right:2px; +} + +.sectAttack-show:checked ~ label.col1:hover { + background-color: var(--col1-bg-2-highlight); } .attacks-grid-weapon-name { grid-column:2/9; color:#333; font-weight:bold; - width:calc(100% - 2px); - margin-right:2px; + width:100%; } .attacks-grid-damage-type { @@ -755,6 +783,11 @@ h4 { margin-bottom: 15px; } +.repcontainer[data-groupname="repeating_bonuses"] > .repitem { + display:inline-block; + width:33.33%; +} + .repcontainer[data-groupname="repeating_organization"] > .repitem { display: inline-block; } @@ -1033,6 +1066,7 @@ input:checked + .toggle-knob::after { .immuneShow:not(:checked) ~ .immuneBody, .statusBody:not(:checked) ~ .statusBody, .pilotSkillShow:not(:checked) ~ .pilotBody, +.commanderSkillShow:not(:checked) ~ .commanderBody, .sectAttack-show:not(:checked) ~ .sectAttack, .sectCon-show:checked ~ .sectCon, .sect-show:not(:checked) ~ .sect, @@ -1283,6 +1317,7 @@ input:not(:checked) + label.clickable.textHead2Col { --dm-scrollbar2-thumb: #1e1e44; --dm-scrollbar2-shaft: #60608c; --dm-col1: #55555a; + --dm-col1-highlight: #727275; --dm-input-border: #707099; --dm-input-border-top: #44445c; --dm-input-disabled-bg: #334; @@ -1358,6 +1393,10 @@ input:not(:checked) + label.clickable.textHead2Col { color: var(--dark-primarytext); } +.sheet-darkmode .charsheet .sectAttack-show:checked ~ label.col1:hover { + background-color: var(--dm-col1-highlight); +} + .sheet-darkmode .charsheet hr { opacity: 0.3; } diff --git a/Star Wars Saga Edition/StarWarsSagaEdition.html b/Star Wars Saga Edition/StarWarsSagaEdition.html index 9825fd3b78a..44a28ea946d 100644 --- a/Star Wars Saga Edition/StarWarsSagaEdition.html +++ b/Star Wars Saga Edition/StarWarsSagaEdition.html @@ -459,7 +459,13 @@