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

refactor(frontend): swap WindiCSS out for UnoCSS #533

Merged
merged 5 commits into from
Mar 31, 2023
Merged

refactor(frontend): swap WindiCSS out for UnoCSS #533

merged 5 commits into from
Mar 31, 2023

Conversation

ravenclaw900
Copy link
Owner

@ravenclaw900 ravenclaw900 commented Mar 29, 2023

Part 1.75 out of 3 to cleanup frontend

WindiCSS's last commit was on June 30, and UnoCSS is by the same author and supports the same things, while being faster and more feature-rich. It also lets us use icons in CSS, and looks like it will eventually let us use themes for #29. It supports a svelte-scoped mode, which uses Svelte's native CSS class scoping, so that the global stylesheet doesn't grow with the addition of every single-use class.

@ravenclaw900 ravenclaw900 added the javascript Pull requests that update Javascript code label Mar 29, 2023
@ravenclaw900 ravenclaw900 self-assigned this Mar 29, 2023
Copy link
Collaborator

@MichaIng MichaIng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great cleanup for (our) code indeed. Adds a lot of (build) dependencies, but I guess it has no or only minor impact on the size of compiled frontend assets, right?

@ravenclaw900
Copy link
Owner Author

I guess it has no or only minor impact on the size of compiled frontend assets

The compiled frontend assets are actually slightly smaller in size, but there's not much difference.

@MichaIng
Copy link
Collaborator

I thought so: compiling might take longer, but no negative effect on results 👍.

@ravenclaw900
Copy link
Owner Author

Interestingly, compiling should actually be shorter, as shown by the benchmarks in https://antfu.me/posts/reimagine-atomic-css#performance. Really the only caveat of switching to UnoCSS is that there are still a couple of bugs that need to be worked around (like unocss/unocss#2379).

@ravenclaw900 ravenclaw900 merged commit 1be0b1b into main Mar 31, 2023
@ravenclaw900 ravenclaw900 deleted the unocss branch March 31, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants