diff --git a/components/_healthBox.css b/components/_healthBox.css index bdc6275..17531b7 100644 --- a/components/_healthBox.css +++ b/components/_healthBox.css @@ -14,6 +14,7 @@ margin: -1px; } /* TODO: Refactor to use Labels !!!! */ + label { &.healthTrackerBox { cursor: pointer; @@ -27,6 +28,7 @@ width: 6rem; height: 6rem; border-radius: 3px; + padding: 0px; &.reset { order: 2; @@ -39,21 +41,19 @@ top: 2px; right: 4px; } - - &:checked { - position: absolute; - opacity: 0; - z-index: 0; - } - - &:checked ~ .healthTrackerBox { - order: 3; - background-color: #444444; - } - - &:focus { - outline: none; - } + } + } + + input:checked { + & + .healthTrackerBox { + position: absolute; + opacity: 0; + z-index: 0; + } + + & ~ .healthTrackerBox { + order: 3; + background-color: #444444; } } } diff --git a/output/main.css b/output/main.css index d313af1..6ffa4e7 100644 --- a/output/main.css +++ b/output/main.css @@ -31,6 +31,7 @@ input.sheet-tabstoggle[value="main"] ~ .main-tab { border: 2px solid #500; border-radius: 3px; order: 1; + padding: 0; position: relative; } @@ -46,21 +47,17 @@ input.sheet-tabstoggle[value="main"] ~ .main-tab { right: 4px; } -.healthWrapper > .healthContainer > label.healthTrackerBox:checked { +.healthWrapper > .healthContainer > input:checked + .healthTrackerBox { opacity: 0; z-index: 0; position: absolute; } -.healthWrapper > .healthContainer > label.healthTrackerBox:checked ~ .healthTrackerBox { +.healthWrapper > .healthContainer > input:checked ~ .healthTrackerBox { background-color: #444; order: 3; } -.healthWrapper > .healthContainer > label.healthTrackerBox:focus { - outline: none; -} - .abilityBox { height: -webkit-fit-content; height: -moz-fit-content; diff --git a/output/main.html b/output/main.html index 00106fa..b38c4a4 100644 --- a/output/main.html +++ b/output/main.html @@ -90,20 +90,17 @@

Health

+
- - - - + + + + + + + +
diff --git a/views/_main-sheet.pug b/views/_main-sheet.pug index 429656a..cec06fb 100644 --- a/views/_main-sheet.pug +++ b/views/_main-sheet.pug @@ -5,14 +5,16 @@ include .././components/_abilityBox .healthBox h2 Health + input(type="number" name="attr_physicalhealth" disabled="true" value="@{physicalHealth}") .healthWrapper .healthContainer - label.healthTrackerBox.reset - input.hidden.vis(type="radio" name="attr_physicalHealth" value="0" checked="checked") - label.healthTrackerBox - input.hidden.vis(type="radio" name="attr_physicalHealth" value="1") - label.healthTrackerBox - input.hidden.vis(type="radio" name="attr_physicalHealth" value="2") - label.healthTrackerBox - input.hidden.vis(type="radio" name="attr_physicalHealth" value="3") + input.hidden.disp(id="physK0" type="radio" name="attr_physicalHealth" value="0" checked="checked") + label.healthTrackerBox.reset(for="physK0") + input.hidden.disp(id="physK1" type="radio" name="attr_physicalHealth" value="1") + label.healthTrackerBox(for="physK1") + input.hidden.disp(id="physK2" type="radio" name="attr_physicalHealth" value="2") + label.healthTrackerBox(for="physK2") + input.hidden.disp(id="physK3" type="radio" name="attr_physicalHealth" value="3") + label.healthTrackerBox(for="physK3") +