Module:Userbox: Difference between revisions
m
1 revision imported
en>Timrollpickering m (→top: update cat per Wikipedia:Categories for discussion/Log/2019 June 18, replaced: Potentially illegible userboxes → Userboxes with insufficient color contrast) |
Squareblob (talk | contribs) m (1 revision imported) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 82:
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
Line 124:
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args[
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args[
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args[
-- Get info values.
data.info = args
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-s'], 8, 'pt')
data.infoColor = args[
data.infoPadding = args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-lh'] or '1.25em'
Line 147:
data.idWidth = checkNumAndAddSuffix(args['id1-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['id-h'], 45, 'px')
data.idBackgroundColor = args[
data.idTextAlign = 'center'
data.idFontSize = checkNumAndAddSuffix(args['id1-s'], 14, 'pt')
Line 160:
data.id2Width = checkNumAndAddSuffix(args['id2-w'], 45, 'px')
data.id2Height = data.idHeight
data.id2BackgroundColor = args[
data.id2TextAlign = 'center'
data.id2FontSize = checkNumAndAddSuffix(args['id2-s'], 14, 'pt')
Line 179:
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
|