Name CSS Import

Hey, I'm doing dark/light mode switching for code blocks using HighlightJS and I want to name the imported stylesheet so that I can toggle it on / off depending on if it's dark mode.
import "highlight.js/styles/github-dark.css";
import "highlight.js/styles/github.css";
import "highlight.js/styles/github-dark.css";
import "highlight.js/styles/github.css";
would become something like
import "highlight.js/styles/github-dark.css" as GitHubDark;
import "highlight.js/styles/github.css" as GitHub;

document.styleSheets.find(title == githubdark)
import "highlight.js/styles/github-dark.css" as GitHubDark;
import "highlight.js/styles/github.css" as GitHub;

document.styleSheets.find(title == githubdark)
Something like that - anyone know if that's possible? Thanks
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server