Skip to content

Commit 15df704

Browse files
authored
fix(styles): moving styles to stacks css classes, adding positioning (#424)
* fix(styles): moving styles to stacks css classes, adding positioning * Ah linting, my old friend.
1 parent a54dbd1 commit 15df704

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.changeset/some-facts-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@stackoverflow/stacks-editor": patch
3+
---
4+
5+
Refactor inline styling to stacks css classes, adding positioning class

plugins/official/stack-snippets/src/snippet-view.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,12 @@ export class StackSnippetView implements NodeView {
127127
//Clear the node
128128
this.resultContainer.innerHTML = "";
129129
const iframe = document.createElement("iframe");
130-
iframe.className = "snippet-box-edit snippet-box-result";
130+
iframe.className =
131+
"snippet-box-edit snippet-box-result ps-relative w100 hmn0 baw0";
131132
iframe.setAttribute(
132133
"sandbox",
133134
"allow-forms allow-modals allow-scripts"
134135
);
135-
iframe.style.width = "100%";
136-
iframe.style.border = "0px";
137-
iframe.style.minHeight = "300px";
138136
if (content.nodeType === Node.DOCUMENT_NODE) {
139137
const document = <Document>content;
140138
iframe.srcdoc = document.documentElement.innerHTML;

0 commit comments

Comments
 (0)