Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve FOUC issue on initial render of custom elements #187

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "./button-link.js";
import "./code-review-section.js";
import "./footer-link-list.js";
import "./footer.js";
import "./header.js";
import "./hero.js";
import "./icon-link-list.js";
import "./image.js";
import "./intro-section.js";
import "./language-section.js";
import "./participant-review-section.js";
import "./participant-review.js";
import "./step-section.js";
import "./step.js";
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<script src="./main.js" type="module"></script>
</head>

<body>
<body style="display: none">
DaleSeo marked this conversation as resolved.
Show resolved Hide resolved
<ds-header></ds-header>

<ds-intro-section id="intro-section">
Expand Down
19 changes: 5 additions & 14 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import "./components/button-link.js";
import "./components/code-review-section.js";
import "./components/footer-link-list.js";
import "./components/footer.js";
import "./components/header.js";
import "./components/hero.js";
import "./components/icon-link-list.js";
import "./components/image.js";
import "./components/intro-section.js";
import "./components/language-section.js";
import "./components/participant-review.js";
import "./components/participant-review-section.js";
import "./components/step.js";
import "./components/step-section.js";
import "./components/index.js";

document.addEventListener("DOMContentLoaded", () => {
document.querySelector("body").style.display = "block";
});