From: Mischa POSLAWSKY Date: Sun, 29 May 2022 13:05:35 +0000 (+0200) Subject: sc: single row >48em width by omitting category column X-Git-Tag: v1.14~85 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/3cea0c12d3af9e81ce4999ecb1334221cb6d38fe sc: single row >48em width by omitting category column Fit larger styling on intermediate widths below 52em. --- diff --git a/sc.css b/sc.css index d670cf8..0c0a829 100644 --- a/sc.css +++ b/sc.css @@ -9,7 +9,6 @@ padding: 0 0.2em; background: transparent; text-align: left; - vertical-align: top; } tr.alt td { font-size: 70%; @@ -107,26 +106,29 @@ td.hurtrel { } @media (max-width: 52em) { + .units thead th:first-child, + .units tbody .cat { + position: absolute; + visibility: hidden; + } +} +@media (max-width: 48em) { .units { width: auto; } - .units th { + .units th, .units td { + vertical-align: top; } .units td { height: 2em; } - .units tbody .cat { - position: absolute; - visibility: hidden; - } .units td:nth-child(2) { - max-width: 6.5em; white-space: normal; - overflow: hidden; + padding: 0; } - .units thead th:first-child, + .units tr.sub td:nth-child(2), .units .cat, .units .unit-speed, .units .hurtrel, diff --git a/sc.plp b/sc.plp index 3c018e5..3c19fce 100644 --- a/sc.plp +++ b/sc.plp @@ -356,12 +356,11 @@ sub showrangeint { $_->{attr}->{jump} && qq'↕', '' . showmagic($_), - !$_->{attack}->[1] ? () : ( - '', showattack($_, 1), '' - ), - !$_->{attack}->[2] ? () : ( - '', showattack($_, 2), '' - ), + (map {( + '', + showattack($row, $_), + '', + )} 1 .. $#{ $_->{attack} }), "\n" ); }