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: change link icon class to use unocss #108

Merged
merged 1 commit into from
Jun 9, 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
3 changes: 3 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
export let data;
</script>

<!-- Needed to tell unocss that the link icon is indeed used -->
<div class="i-fa6-solid-link is-hidden" />

<HtmlHead />

<input id="low-contrast" type="checkbox" class="is-hidden" />
Expand Down
4 changes: 2 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export default {
content: {
type: "element",
tagName: "span",
properties: { className: "icon header-anchor-container pl-3" },
properties: { className: "header-anchor-container pl-2" },
children: [
{
type: "element",
tagName: "i",
properties: {
className: "header-anchor fas fa-lg fa-link has-text-link is-size-5"
className: "header-anchor icon i-fa6-solid-link has-text-link is-size-5"
}
}
]
Expand Down
6 changes: 1 addition & 5 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import { defineConfig, presetIcons } from "unocss";
export default defineConfig({
presets: [
presetIcons({
collections: {
"fa6-solid": () => import("@iconify-json/fa6-solid/icons.json").then((i) => i.default),
"fa6-brands": () => import("@iconify-json/fa6-brands/icons.json").then((i) => i.default),
tabler: () => import("@iconify-json/tabler/icons.json").then((i) => i.default)
},
// Collections are automatically imported from inconify packages
customizations: {
iconCustomizer(collection, icon, props) {
// Makes the empty cut in half circle slightly larger
Expand Down
Loading