sc: prefix mineral and gas classes, apply in legend
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 23 Apr 2018 15:46:23 +0000 (17:46 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 10 May 2018 14:49:06 +0000 (16:49 +0200)
sc.css
sc.plp

diff --git a/sc.css b/sc.css
index 2d73ee0537a7b98370cf066264de98fdc8ac9974..19b40b08312e3d77f381bad9236d29327c387e01 100644 (file)
--- a/sc.css
+++ b/sc.css
@@ -38,10 +38,10 @@ table h2 {
 .units td.unit + td.unit {
        padding-left: 0;
 }
-.gas {
+.unit-gas {
        color: #040;
 }
-.min, .min a:not(:hover) {
+.unit-min, .unit-min a:not(:hover) {
        color: #004;
 }
 .unit-supply {
@@ -184,7 +184,7 @@ tbody .unit-shield {
        .units .hurtrel,
        .units .unit-pop, .units .unit-type,
        .units .unit-shield,
-       .units .gas {
+       .units .unit-gas {
                padding: 0;
                position: absolute;
                margin-top: 3.2ex;
diff --git a/sc.plp b/sc.plp
index 0a4101821ff6d35f33d2a50b11a0e2d4c4ea9088..6dfa65c3cb1ba57c05d712dacdbc14b19da11412 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -104,8 +104,8 @@ sub coltoggle {
 <thead><tr>
        <th><:= coltoggle(exists $get{order} ? 'race' : 'source' => '') :></th>
        <th class="unit-name"><:= coltoggle(name => 'name') :></th>
-       <th class="val min" title=minerals><:= coltoggle(cost => 'cost') :></th>
-       <th class="val gas">gas</th>
+       <th class="val unit-min" title=minerals><:= coltoggle(cost => 'cost') :></th>
+       <th class="val unit-gas">gas</th>
        <th class="val time"><:= coltoggle(build => 'build') :></th>
        <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
        <th class="unit unit-attr" colspan="2">attr</th>
@@ -264,8 +264,8 @@ sub showrangeint {
                $_->{hp} += $_->{shield} if $_->{shield};
 
                return (
-                       '<td class="val min">' . ($_->{min} // ''),
-                       '<td class="val gas">' . ($_->{gas} || ''),
+                       '<td class="val unit-min">' . ($_->{min} // ''),
+                       '<td class="val unit-gas">' . ($_->{gas} || ''),
                        defined $_->{transform} ? sprintf('<td class="val time">%.0f',
                                $_->{transform},
                        ) :
@@ -447,7 +447,8 @@ sub showrangeint {
 
 <dl>
 <dt>cost
-       <dd>minerals and gas required to create one unit
+       <dd><span class="unit-min">minerals</span> and
+               <span class="unit-gas">gas</span> required to create one unit
        <dd>includes total expenses if based on existing units
 <dt>build
        <dd>relative time needed to create at least one unit