Module:Su: Difference between revisions

Default sub/sup font-size should match with sub/sup size set in Common.css. That should reduce excess line-height. Use proper monospace 'hack'.
m (1 revision: What an ugly messy way to do this!)
(Default sub/sup font-size should match with sub/sup size set in Common.css. That should reduce excess line-height. Use proper monospace 'hack'.)
Line 20:
local options = {
align = args.a,
fontSize = args.w,
lineHeight = args.lh,
verticalAlign = args.va
}
return p._main(sup, sub, options)
Line 33 ⟶ 35:
['display'] = 'inline-block',
['margin-bottom'] = '-0.3em',
['vertical-align'] = options.verticalAlign or sub and '-0.4em' or '0.8em',
['line-height'] = options.lineHeight or '1.2em',
}
if options.fontSize == 'f' or options.fontSize == 'fixed' then
span:css{
['font-family'] = 'monospace,couriermonospace',
['font-size'] = '8580%'
}
else
span:css('font-size', options.fontSize and options.fontSize or '8580%')
end
if options.align == 'r' or options.align == 'right' then
Anonymous user