-
Notifications
You must be signed in to change notification settings - Fork 83
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
Make it possible to load Lumo as a CSS file #7976
Comments
Note that HTML doesn't support Also IIRC there was a problem with the following CSS files in
|
This is still an issue, e.g. this is how We probably need to update the css-generator script so that it excludes |
Importing the CSS files through JS already seems to work in a Vite project at least:
The utility styles are problematic though. They are structured as CSS module, so just adding:
doesn't register any global classes because Vite expects you to import individual classes from the module. However:
results in a TS error because there are no TS definitions for that module. I think we should just use a regular CSS file here, having to import every single utility class you want to use through an import sounds like a pain. @marcushellberg Can you maybe clarify your expectations:
I think it we want to do something along those lines we'd probably structure it so that utility styles are optional. Though there could be a file that imports everything. Putting the CSS files into |
I would like to be able to import two files: Lumo itself and the utility classes. In some cases, I want to use Tailwind instead of our utility classes, so it's more flexible if they're a separate import. Intuitively, I would expect the Lumo styles to be in |
Describe your motivation
I often start projects from start.spring.io and need to manually load Lumo in my project. I'm primarily working with Hilla and I don't want to introduce the added complexity of a theme in my demos when a plain CSS import would do.
Describe the solution you'd like
I would like to be able to import Lumo in a React component (or just in any HTML) similar to this:
Describe alternatives you've considered
Right now, I create a separate file where I import separate files from
react-components
(which is odd).The problem with this, besides the added work in a live code demo, is that I don't actually know which all files I should include.
Additional context
No response
The text was updated successfully, but these errors were encountered: