Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
m added comments
Tristanbay (talk | contribs)
see if overflow:auto fixes the overflowing fields problem on mobile
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 = "| <span style=\"display: inline-block; margin-bottom: -45px; transform: translate(0, %spx); white-space: nowrap;\">%s</span>\n"
local spanf = "| <span style=\"display:inline-block; overflow:auto; margin-bottom:-45px; transform:translate(0, %spx); white-space:nowrap;\">%s</span>\n"
local arrow_marg = -2.5
local arrow_marg = -2.5
local sharp_marg = -15
local sharp_marg = -15
Line 46: Line 46:
end
end
tab = tab .. "\n|-\n! Sharp symbol\n"
tab = tab .. "\n|-\n! Sharp symbol\n"
.. "| rowspan=\"2\" | <span style=\"white-space: nowrap;\">&#x202F;[[File:Heji18.svg|15px]]</span>\n"
.. "| rowspan=\"2\" | <span style=\"white-space:nowrap;\">&#x202F;[[File:Heji18.svg|15px]]</span>\n"
for i = 1, sharp * 2 + 1 do
for i = 1, sharp * 2 + 1 do
local cs = math.ceil((i / sharp) - 0.5) -- sharpness of note
local cs = math.ceil((i / sharp) - 0.5) -- sharpness of note