Dice: move from inline CSS.

master
Matt Miller 2014-08-30 14:53:24 -04:00
parent 80897ce535
commit f48a4c8ccc
3 changed files with 11 additions and 3 deletions

View File

@ -96,8 +96,8 @@ handle remainder_lc => sub {
}
$total += $sum; # track total of all rolls
$out .= join(', ', @output) . '<br/>';
$html .= '<span style="font-size:2em;">' . join(' ', @output).'</span>'
.'<span style="white-space: nowrap; font-size:2em;">'." = ". $sum.'</span></br>';
$html .= '<span class="zci--dice-die">' . join(' ', @output).'</span>'
.'<span class="zci--dice-sum">'." = ". $sum.'</span></br>';
}
elsif ($_ =~ /^(\d*)[d|w](\d+)\s?([+-])?\s?(\d+|[lh])?$/) {
# ex. '2d8', '2w6 - l', '3d4 + 4', '3d4-l'

View File

@ -0,0 +1,8 @@
.zci--answer .zci--dice-die {
font-size: 2em;
}
.zci--answer .zci--dice-sum {
font-size: 2em;
white-space: nowrap;
}

View File

@ -117,7 +117,7 @@ ddg_goodie_test(
# Check the HTML. Just once for a longhand query.
"throw die" => test_zci(qr/^.$/,
html => qr/<span style="font-size:2em;">.<\/span><span style="white-space: nowrap; font-size:2em;"> = \d+<\/span><\/br>/,
html => qr/<span class="zci--dice-die">.<\/span><span class="zci--dice-sum"> = \d+<\/span><\/br>/,
heading => $heading
),