diff --git a/core/wiki/functions/themes.tid b/core/wiki/functions/themes.tid index 152ab9b03..8ecbfc97e 100644 --- a/core/wiki/functions/themes.tid +++ b/core/wiki/functions/themes.tid @@ -17,9 +17,9 @@ tags: $:/tags/Global \function convert.to.in(value) [divide[96]] \function convert.to.pc(value) [convert.to.inmultiply[6]] \function convert.to.pt(value) [convert.to.inmultiply[72]] -\function convert.to.em(value) [divide{$:/themes/tiddlywiki/vanilla/metrics/fontsize}] +\function convert.to.em(value) [[storyTiddler]is[variable]thendivide{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}] [[storyTiddler]!is[variable]thendivide{$:/themes/tiddlywiki/vanilla/metrics/fontsize}] -\function convert.to.pixels(value,metric) [match[cm]thenmultiply[37.8]] [match[mm]thenmultiply[37.8]divide[10]] [match[Q]thenmultiply[37.8]divide[40]] [match[in]thenmultiply[96]] [match[pc]thenmultiply[96]divide[6]] [match[pt]thenmultiply[96]divide[72]] [match[em]thenmultiply{$:/themes/tiddlywiki/vanilla/metrics/fontsize}] +\function convert.to.pixels(value,metric) [match[cm]thenmultiply[37.8]] [match[mm]thenmultiply[37.8]divide[10]] [match[Q]thenmultiply[37.8]divide[40]] [match[in]thenmultiply[96]] [match[pc]thenmultiply[96]divide[6]] [match[pt]thenmultiply[96]divide[72]] [match[em]then[storyTiddler]is[variable]thenmultiply{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}] [match[em]then[storyTiddler]!is[variable]thenmultiply{$:/themes/tiddlywiki/vanilla/metrics/fontsize}] \function subtract.one.from.sidebarbreakpoint(value) [is.pixel.valuesubtract[1]addsuffix[px]] :else[is.cm.valuefunction[convert.to.pixels],,[cm]subtract[1]divide[37.8]addsuffix[cm]] :else[is.mm.valuefunction[convert.to.pixels],,[mm]subtract[1]divide[37.8]multiply[10]addsuffix[mm]] :else[is.Q.valuefunction[convert.to.pixels],,[Q]subtract[1]divide[37.8]multiply[40]addsuffix[Q]] :else[is.in.valuefunction[convert.to.pixels],,[in]subtract[1]divide[96]addsuffix[in]] :else[is.pc.valuefunction[convert.to.pixels],,[pc]subtract[1]divide[96]multiply[6]addsuffix[pc]] :else[is.pt.valuefunction[convert.to.pixels],,[pt]subtract[1]divide[96]multiply[72]addsuffix[pt]] :else[is.em.valuefunction[convert.to.pixels],,[em]subtract[1]divide{$:/themes/tiddlywiki/vanilla/metrics/fontsize}addsuffix[em]]