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

Update generated Lumo.css to also include typography styles #241

Open
marcushellberg opened this issue Mar 27, 2024 · 5 comments
Open

Update generated Lumo.css to also include typography styles #241

marcushellberg opened this issue Mar 27, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@marcushellberg
Copy link
Member

Describe your motivation

With Hilla 24.4 and the new FS router, I can create a project on start.spring.io, add a index file in the views directory and have a running Hilla app. But loading Lumo is difficult. I don't want to create a full themes folder structure because I will be writing all my CSS in plain CSS files anyway.

Describe the solution you'd like

I would like to be able to import lumo styles from CSS, something like

@import('@vaadin/lumo/all.css');
/* or more specific ones */
@import('@vaadin/lumo/utility.css');

Describe alternatives you've considered

Loading it with JS like this. But loading CSS in JS feels wrong.

Additional context

This is to help people starting their Vaadin journey outside of start.vaadin.com to get a nice looking app with minimal work.

@web-padawan
Copy link
Member

There are CSS files generated for @vaadin/react-components project, e.g. @vaadin/react-components/Lumo.css.

@marcushellberg
Copy link
Member Author

That doesn't seem to work in a 24.4.alpha18 project.

import '@vaadin/react-components/Lumo.css';

Generates a Vite-error:

[vite] Internal server error: Missing "./Lumo.css" specifier in "@vaadin/react-components" package

@web-padawan
Copy link
Member

My bad, the correct exported file is @vaadin/react-components/css/Lumo.css. See the list of package exports.

@marcushellberg
Copy link
Member Author

Thanks. That worked.

It would be helpful in my opinion if Lumo.css also included typography so that the font styles it loads also get applied to the page.

@web-padawan web-padawan changed the title Make it possible to load lumo styles from CSS Update generated Lumo.css to also include typography styles Apr 1, 2024
@web-padawan web-padawan transferred this issue from vaadin/web-components Apr 1, 2024
@web-padawan
Copy link
Member

It would be helpful in my opinion if Lumo.css also included typography

Updated the issue accordingly and moved to the correct repository.

@yuriy-fix yuriy-fix added the enhancement New feature or request label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants