Skip to content

Commit

Permalink
Move style statements to embedded CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsherman committed Dec 11, 2024
1 parent 0ac8a32 commit 99ba5ca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/snowfall/snowfall-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export class SnowfallScene {
const style = doc.createElement('style');
style.textContent = `
.mg5dev-snowfall-scene {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: white;
}
Expand Down Expand Up @@ -72,11 +78,6 @@ export class SnowfallScene {
const rootElement = doc.createElement('div');

rootElement.classList.add('mg5dev-snowfall-scene');
rootElement.style.position = 'fixed';
rootElement.style.top = '0';
rootElement.style.left = '0';
rootElement.style.width = '100%';
rootElement.style.height = '100%';

rootElement.appendChild(this.#createRootElementStyle(doc));

Expand Down

0 comments on commit 99ba5ca

Please sign in to comment.