From 48e1d1c23f8c22d9bfcd228229faa7f8aaa34026 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 4 Mar 2021 13:46:42 -0500 Subject: [PATCH] CSS: Fix class name for outer iframe `` tag * Add the class "pad" to the `` tag in `pad.html` (the outer iframe's parent). * Change the CSS selector that refers to the `` tag in `pad.html` from `html:not(.inner-editor)` to `html.pad`. * Change the class name of the outer iframe's `` tag from "inner-editor" to "outer-editor". * Update CSS rules to use the new class name. --- src/static/css/iframe_editor.css | 2 +- src/static/css/pad/layout.css | 2 +- src/static/js/ace.js | 2 +- src/templates/pad.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index 2a63c3802..d106880b6 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -4,7 +4,7 @@ @import url('./lists_and_indents.css'); -html.inner-editor { +html.outer-editor, html.inner-editor { height: auto !important; background-color: transparent !important; } diff --git a/src/static/css/pad/layout.css b/src/static/css/pad/layout.css index e5b79c268..e0bd04b74 100644 --- a/src/static/css/pad/layout.css +++ b/src/static/css/pad/layout.css @@ -4,7 +4,7 @@ html, body { margin: 0; padding: 0; } -html:not(.inner-editor), html:not(.inner-editor) body { +html.pad, html.pad body { overflow: hidden; } body { diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 44556dd0f..57ccde13e 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -207,7 +207,7 @@ const Ace2Editor = function () { })();`; const outerHTML = - [doctype, ``]; + [doctype, ``]; pushStyleTagsFor(outerHTML, includedCSS); // bizarrely, in FF2, a file with no "external" dependencies won't finish loading properly diff --git a/src/templates/pad.html b/src/templates/pad.html index 26243806a..7bf2346f9 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -7,7 +7,7 @@ <% e.begin_block("htmlHead"); %> - + <% e.end_block(); %> <%=settings.title%>