Skip to content

Commit

Permalink
used :has to remove unnecessary hidden input flags
Browse files Browse the repository at this point in the history
  • Loading branch information
vince-roll20 committed Dec 5, 2024
1 parent d6b6cdc commit e312a9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 11 additions & 6 deletions Forbidden_Lands/Forbidden_Lands.css
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,12 @@
font-size: 24px;
height: 15px;
line-height: 14px;
margin: 0 0 0 -20px;
margin: -3px 0 0 -21px;
text-align: center;
vertical-align: middle;
width: 15px;
border-radius: 50%;
outline: 1px solid #000;
}

.charsheet .conditions-grid input.xbox {
Expand Down Expand Up @@ -2962,12 +2964,15 @@ button.torches:hover::after {
grid-row-start: 6;
}

.charsheet input.conditions-hungry:checked ~ div > span.conditions-hungry,
.charsheet input.conditions-sleepy:checked ~ div > span.conditions-sleepy,
.charsheet input.conditions-thirsty:checked ~ div > span.conditions-thirsty,
.charsheet input.conditions-cold:checked ~ div > span.conditions-cold {
.charsheet div:has(input.conditions-hungry:hover) ~ div > span.conditions-hungry,
.charsheet div:has(input.conditions-sleepy:hover) ~ div > span.conditions-sleepy,
.charsheet div:has(input.conditions-thirsty:hover) ~ div > span.conditions-thirsty,
.charsheet div:has(input.conditions-cold:hover) ~ div > span.conditions-cold,
.charsheet div:has(input.conditions-hungry:checked) ~ div > span.conditions-hungry,
.charsheet div:has(input.conditions-sleepy:checked) ~ div > span.conditions-sleepy,
.charsheet div:has(input.conditions-thirsty:checked) ~ div > span.conditions-thirsty,
.charsheet div:has(input.conditions-cold:checked) ~ div > span.conditions-cold {
color: #a60100;
font-weight: bold;
}

/* ---------------------------------- Critical Injuries */
Expand Down
4 changes: 0 additions & 4 deletions Forbidden_Lands/Forbidden_Lands.html
Original file line number Diff line number Diff line change
Expand Up @@ -615,19 +615,15 @@ <h1 data-i18n="condition-u">CONDITIONS</h1>
<div class="skull-image"></div>
</div>
<div class="conditions-box3"><input class="input xbox conditions-hungry" type="checkbox" name="attr_hungry" value="1" data-i18n-title="condition-hungry" title="You must eat a ration of food at least once every day. After a day without food, you become HUNGRY. @{hungry}"><span></span></div>
<input class="hidden conditions-hungry" type="checkbox" name="attr_hungry" value="1">
<div class="conditions-box4"><span class="header-h1 conditions-hungry" data-i18n="hungry">Hungry</span></div>
<span class="conditions-box5"><input type="text" class="input" name="attr_hungry_note" placeholder="notes" data-i18n-placeholder="notes" title="@{hungry_note}"/></span>
<div class="conditions-box6"><input class="input xbox conditions-sleepy" type="checkbox" name="attr_sleepy" value="1" data-i18n-title="condition-sleepy" title="You need to sleep for at least one Quarter Day of each day. After one day without sleep, you become SLEEPY. @{sleepy}"><span></span></div>
<input class="hidden conditions-sleepy" type="checkbox" name="attr_sleepy" value="1">
<div class="conditions-box7"><span class="header-h1 conditions-sleepy" data-i18n="sleepy">Sleepy</span></div>
<span class="conditions-box8"><input type="text" class="input" name="attr_sleepy_note" placeholder="notes" data-i18n-placeholder="notes" title="@{sleepy_note}"/></span>
<div class="conditions-box9"><input class="input xbox conditions-thirsty" type="checkbox" name="attr_thirsty" value="1" data-i18n-title="condition-thirsty" title="You must drink a ration of water at least once per day. After a day without water, you become THIRSTY. @{thirsty}"><span></span></div>
<input class="hidden conditions-thirsty" type="checkbox" name="attr_thirsty" value="1">
<div class="conditions-box10"><span class="header-h1 conditions-thirsty" data-i18n="thirsty">Thirsty</span></div>
<span class="conditions-box11"><input type="text" class="input" name="attr_thirsty_note" placeholder="notes" data-i18n-placeholder="notes" title="@{thirsty_note}"/></span>
<div class="conditions-box12"><input class="input xbox conditions-cold" type="checkbox" name="attr_cold" value="1" data-i18n-title="condition-cold" title="When the cold is bitter and you don't have enough shelter, you have to roll ENDURANCE regularly. @{cold}"><span></span></div>
<input class="hidden conditions-cold" type="checkbox" name="attr_cold" value="1">
<div class="conditions-box13"><span class="header-h1 conditions-cold" data-i18n="cold">Cold</span></div>
<span class="conditions-box14"><input type="text" class="input" name="attr_cold_note" placeholder="notes" data-i18n-placeholder="notes" title="@{cold_note}"/></span>
</div>
Expand Down

0 comments on commit e312a9e

Please sign in to comment.