Module:Abilities/card: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Better fontsize calculation for upgrades who don't have readymade lang keys |
m another take on improving font-size calc for upgradebox |
||
| Line 426: | Line 426: | ||
-- Vary the font size based on the number of characters to prevent overflow | -- Vary the font size based on the number of characters to prevent overflow | ||
local fontsize = '0. | local fontsize = '1rem' | ||
if desc_length > 20 and desc_length < 41 then | |||
fontsize = '0.9rem' | |||
elseif desc_length > 40 and desc_length < 61 then | |||
fontsize = '0.8rem' | fontsize = '0.8rem' | ||
elseif desc_length > | elseif desc_length > 60 then | ||
fontsize = '0.7rem' | fontsize = '0.7rem' | ||
end | end | ||