Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
missed a "+ 1"
Tristanbay (talk | contribs)
tried adding overflow-x:auto to both cells and entire table
Line 9: Line 9:
function p.ud_sharpness(frame) -- generate table
function p.ud_sharpness(frame) -- generate table
local sharp = sharp_n(frame.args["edo"])
local sharp = sharp_n(frame.args["edo"])
local spanf = "| style=\"margin-bottom:-45px; transform:translate(0, %spx); white-space:nowrap;\" | %s\n"
local spanf = "| <div style=\"overflow-x:auto; margin-bottom:-45px; transform:translate(0, %spx); white-space:nowrap;\">%s</div>\n"
local arrow_marg = -2.5
local arrow_marg = -2.5
local sharp_marg = -15
local sharp_marg = -15
Line 21: Line 21:
tab = "{{sharpness-flat1}}"
tab = "{{sharpness-flat1}}"
elseif sharp == 0 then
elseif sharp == 0 then
tab = "{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"
.. "! Step offset\n"
.. "! Step offset\n"
Line 34: Line 34:
.. string.format(spanf, arrow_marg, string.rep("&#x202F;[[File:Up arrow petaluma script.svg|10px]]", 2))
.. string.format(spanf, arrow_marg, string.rep("&#x202F;[[File:Up arrow petaluma script.svg|10px]]", 2))
.. string.format(spanf, arrow_marg, string.rep("&#x202F;[[File:Up arrow petaluma script.svg|10px]]", 3))
.. string.format(spanf, arrow_marg, string.rep("&#x202F;[[File:Up arrow petaluma script.svg|10px]]", 3))
.. "|}"
.. "|}\n</div>"
elseif sharp == 1 then
elseif sharp == 1 then
tab = "{{sharpness-sharp1}}"
tab = "{{sharpness-sharp1}}"
else
else
tab = "{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"
.. "! Step offset\n"
.. "! Step offset\n"
Line 137: Line 137:
end
end
tab = tab .. "|}"
tab = tab .. "|}\n</div>"
end
end