Move FA CSS to app.postcss
This commit is contained in:
@@ -15,9 +15,6 @@
|
||||
<link rel="mask-icon" href="%sveltekit.assets%/favicon.svg" color="#000000" />
|
||||
<meta name="theme-color" content="#6366F1" />
|
||||
<link rel="manifest" href="%sveltekit.assets%/manifest.json" />
|
||||
<style>
|
||||
@import '@fortawesome/fontawesome-free/css/all.min.css';
|
||||
</style>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body style="overflow: hidden;">
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
@import '@fortawesome/fontawesome-free/css/all.min.css';
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
|
||||
.input {
|
||||
@apply flex-1 rounded border-2 border-solid border-primary;
|
||||
}
|
||||
|
||||
@@ -72,14 +72,8 @@
|
||||
const getSvgElement = () => {
|
||||
const svgElement = document.querySelector('#container svg')?.cloneNode(true) as HTMLElement;
|
||||
svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
|
||||
const fontAwesomeCdnUrl = [...document.head.querySelectorAll('link')]
|
||||
.map((link) => link.href)
|
||||
.find((url) => url.includes('font-awesome'));
|
||||
if (fontAwesomeCdnUrl == null) {
|
||||
return svgElement;
|
||||
}
|
||||
const styleElement = document.createElement('style');
|
||||
styleElement.textContent = `@import url("${fontAwesomeCdnUrl}");'`;
|
||||
styleElement.textContent = "@import '@fortawesome/fontawesome-free/css/all.min.css';";
|
||||
svgElement.prepend(styleElement);
|
||||
return svgElement;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user