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

How to deal with css with yew #448

Closed
AlscadIngenierie opened this issue Dec 31, 2018 · 2 comments
Closed

How to deal with css with yew #448

AlscadIngenierie opened this issue Dec 31, 2018 · 2 comments

Comments

@AlscadIngenierie
Copy link

AlscadIngenierie commented Dec 31, 2018

Hi, I would like to use a css front-end framework like bulma with yew. How to deal with CSS with Yew ? How to integrate a css file ?

How to optimize CSS critical rendering path (cssdom) ? What are best practices ?

For example :
We have style.css with .class1 .class2 .class3
And our web app create a view with a component which only use .class1.
So, an optimized CSSDOM approach would be to load or stream only .class1 without loading .class2 and .class3 in an inline css style.

In addition, if the web app generates a view which need .class2 as well, the web app should load .class2 without reloading .class1. or loading .class3. It should be able to rebuild CSSDOM without starting from scratch.

In my opinion, css selectors should be taken into account from the beginning by html html! macro.

@LexLuengas
Copy link

Bulma can be included like any other CSS file. Put stylesheets inside a folder called static along with your index.html and use a link tag as you would otherwise. This applies to any other static resources: as long as they are in the static folder, they will be available at the root of the app and can be included the standard way. You can as well use inline styles if you have to using the html! macro.

What CSSOM tools do you use that achieve the behavior you mentioned?

@jstarry
Copy link
Member

jstarry commented Sep 27, 2019

Closing in favour of #533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants