Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'damage_block.css')
-rw-r--r--damage_block.css61
1 files changed, 61 insertions, 0 deletions
diff --git a/damage_block.css b/damage_block.css
new file mode 100644
index 0000000..46e55a0
--- /dev/null
+++ b/damage_block.css
@@ -0,0 +1,61 @@
+.damage-selector, .damage-effect-indicator {
+ width: 20px;
+ height: 30px;
+}
+
+.damage-selector {
+ margin: 0;
+ padding: 0;
+ border: 1px solid black;
+ display: inline-block;
+}
+
+.damage-effect-indicator {
+ position: absolute;
+ margin: 0;
+ padding: 0;
+ display: block;
+ pointer-events: none;
+ font-family: monospace;
+}
+
+.damage-selector.clear {
+ background-color: white;
+}
+
+.damage-selector.bruise {
+ background-color: orange;
+}
+
+.damage-selector.lethal {
+ background-color: red;
+}
+
+label input[type="radio"] {
+ position: absolute;
+ opacity: 0;
+ margin: 0;
+ padding: 0;
+}
+
+label {
+ display: none;
+ margin: 0;
+ padding: 0;
+}
+
+label:first-of-type {
+ display: block;
+}
+
+label:has(input:checked) {
+ display: none;
+}
+
+label:has(+ label input:checked) {
+ display: none;
+}
+
+label:has(input:checked) + label {
+ display: block;
+} \ No newline at end of file