Dice: move from inline CSS.
parent
80897ce535
commit
f48a4c8ccc
|
@ -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'
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
.zci--answer .zci--dice-die {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.zci--answer .zci--dice-sum {
|
||||
font-size: 2em;
|
||||
white-space: nowrap;
|
||||
}
|
2
t/Dice.t
2
t/Dice.t
|
@ -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
|
||||
),
|
||||
|
||||
|
|
Loading…
Reference in New Issue