Skip to content
Discussion options

You must be logged in to vote

Seems like the order of the stylesheets are messed up:

The main.css should be included first since it has the @layer order there. One way to do this I've found is to import main.css before App.vue in src/main.js:

 import { createApp } from 'vue'
-import App from './App.vue'
-
 import './main.css'
+import App from './App.vue'
 
 createApp(App).mount('#app')

Though really, as per the documentation, it is best to avoid <style> blocks altogether:

--- a/src/App.vue
+++ b/src/App.vue
@@ -1,18 +1,8 @@
 <script setup></script>
 
 <template>
-  <h1 class="my-class-in-main">You did it!</h1>
-  <p class="my-class-in-style">
+  <h1 class="border border-blue-500">You did it!</h1>
+  <p class="border …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@balthild
Comment options

Answer selected by balthild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #19886 on April 01, 2026 12:29.