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 css loading sequence #80

Closed
wants to merge 2 commits into from
Closed

fix: 🐛 change css loading sequence #80

wants to merge 2 commits into from

Conversation

xxholly32
Copy link

@xxholly32 xxholly32 commented Mar 18, 2023

change css loading sequence sfc url

from

<style id="__sfc-styles">.test {
    color: red;
};@import "https://unpkg.com/element-plus@2/dist/index.css";</style>

to

<style id="__sfc-styles">@import "https://unpkg.com/element-plus@2/dist/index.css";.test {
    color: red;
};</style>

closes #79

@xxholly32
Copy link
Author

This may not be the best solution because other sfc files also import css-urls; One solution is to do it all together and the good thing is to do it all together and the bad thing is to think about a lot of things

Another is the option to add css to the import map file, like this, which has the benefit of decoupling the import and the disadvantage of adding a new mental burden

@xxholly32 xxholly32 closed this by deleting the head repository May 16, 2023
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

Successfully merging this pull request may close these issues.

Writing a style to a new file invalidates the style in app.vue
1 participant