From: Justin Wind Date: Sat, 26 Feb 2022 19:47:13 +0000 (-0800) Subject: add viewport to boilerplate, add fix for firefox flash on load X-Git-Tag: v1.0.3~1 X-Git-Url: http://git.squeep.com/?p=squeep-html-template-helper;a=commitdiff_plain;h=885150f50a04b408bfadc3a818615da066908344 add viewport to boilerplate, add fix for firefox flash on load --- diff --git a/lib/template-helper.js b/lib/template-helper.js index af9547e..c61958d 100644 --- a/lib/template-helper.js +++ b/lib/template-helper.js @@ -70,6 +70,7 @@ function htmlHead(pagePathLevel, ctx, options) { } = options; return `\t \t\t +\t\t \t\t \t\t ${headElements.map((e) => '\t\t' + e).join('\n')} @@ -91,8 +92,9 @@ function htmlBody(pagePathLevel, ctx, options, main = []) { const { bodyAttributes = {}, } = options; + const firefoxFix = '\n'; // This fixes a layout rendering flash on load in Firefox; do not know why this works, but it does. return ` -\t +\t${firefoxFix} ${htmlHeader(pagePathLevel, ctx, options)} ${htmlMessages(ctx, options)} \t\t