854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
|
local styles = {}
if opts.width then
table.insert(styles, string.format([[body {padding:0 1em;margin:auto;max-width:%s}]], opts.width))
end
if opts.accent then
table.insert(styles, string.format(':root {--accent:%s}', opts.accent))
end
if opts.accent or (not opts['dark-on-light']) then
stylesNeeded.accent = true
end
for k in pairs(stylesNeeded) do
if not stylesets[k] then ct.exns.unimpl('styleset %s not implemented (!)', k):throw() end
table.insert(styles, prepcss(stylesets[k]))
|
|
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
|
local styles = {}
if opts.width then
table.insert(styles, string.format([[body {padding:0 1em;margin:auto;max-width:%s}]], opts.width))
end
if opts.accent then
table.insert(styles, string.format(':root {--accent:%s}', opts.accent))
end
if opts.accent or (not opts['dark-on-light']) and (not opts['fossil-uv']) then
stylesNeeded.accent = true
end
for k in pairs(stylesNeeded) do
if not stylesets[k] then ct.exns.unimpl('styleset %s not implemented (!)', k):throw() end
table.insert(styles, prepcss(stylesets[k]))
|