Module:Abilities/card: Difference between revisionsGive feedback
m another take on improving font-size calc for upgradebox |
m make fontsize shrink on upgradeboxes trigger later/less |
||
| Line 427: | Line 427: | ||
-- 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 = '1rem' | local fontsize = '1rem' | ||
if desc_length > | if desc_length > 30 and desc_length < 51 then | ||
fontsize = '0.9rem' | fontsize = '0.9rem' | ||
elseif desc_length > | elseif desc_length > 50 and desc_length < 71 then | ||
fontsize = '0.8rem' | fontsize = '0.8rem' | ||
elseif desc_length > | elseif desc_length > 70 then | ||
fontsize = '0.7rem' | fontsize = '0.7rem' | ||
end | end | ||