From 5f17d931dcadfeb17f004374b6eaad095b8a6698 Mon Sep 17 00:00:00 2001 From: Travis Peterson Date: Wed, 8 May 2024 13:44:20 -0700 Subject: [PATCH] use loop and list for d100 dicefonts --- themes/fonts/iconFonts/diceFont.less | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/themes/fonts/iconFonts/diceFont.less b/themes/fonts/iconFonts/diceFont.less index 6fe226a057..7728dd0cb1 100644 --- a/themes/fonts/iconFonts/diceFont.less +++ b/themes/fonts/iconFonts/diceFont.less @@ -111,4 +111,32 @@ &.solid-small-dot-d6-4::before { content : '\f18c'; } &.solid-small-dot-d6-5::before { content : '\f18d'; } &.solid-small-dot-d6-6::before { content : '\f18e'; } + + @tens_runes: '\f100', + '\f101', + '\f103', + '\f104', + '\f105', + '\f106', + '\f107', + '\f108', + '\f109', + '\f10a', + '\f101'; + + &.d100-0::before { + @zeros: (extract(@tens_runes, 1)); + @zeros_dice: @zeros@zeros; + content : (@zeros_dice) + } + each(range(99), { + &.d100-@{value}::before { + @ones: mod(@value,10); + @tens: if(@ones > 0, ceil((@value / 10)), (ceil((@value / 10))+1)); + @tens_dice: extract(@tens_runes, (@tens)); + @ones_dice: extract(@tens_runes, (@ones + 1)); + @final_dice: @tens_dice@ones_dice; + content: (@final_dice); + } + }) } \ No newline at end of file