Nuxt RC10 - Reset inline styles take priority on built bundle
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v16.15.0
- Nuxt Version:
3.0.0-rc.10
- Nitro Version:
0.5.3
- Package Manager:
npm@8.11.0
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
- With UnoCSS and preflight activated for CSS
Reproduction
See this repo for reproduction : https://github.com/g4w3l/nuxt3rc10-unocss
- If you launch the server with
npm run dev
, when you go on/page1
you see a green button as expected - If you build it and launch it with
npm run build
node .output/server/index.mjs
The button on /page1
goes transparent
Describe the bug
I’ve put some styles on a button in a component. All works well in dev
mode, if you inspect the <button>
, the order of the styles is correct and the bg-green
is applied :
In built version the order of the styles is inverted, thus the button is transparent :
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
The build Property - Nuxt
Nuxt use webpack-bundle-analyzer to let you visualize your bundles and how to optimize them. ... If an object, see available properties here ....
Read more >Fix List for Db2 Version 11.1 for Linux, UNIX and Windows - IBM
APAR Sev. Abstract
IT36427 2 MON_GET_AUTO_MAINT_QUEUE() MAY FAIL WITH SQL0493N
IT37394 3 DB2PD ‑BUFFERPOOLS REPORTS INACCURATE HIT RATIO
IT36689 2 REORGCHK F6 REPORTING INCORRECT VALUES
Read more >CSS which takes precedence, inline or the class?
The order of precedence with CSS is as follows: !important (this is a bit hackish though but it is the only way to...
Read more >Styling with Inline CSS Styles in Vue.js - Coding Explained -
I have added a simple div in advance which is 200 pixels in width and height, and the first thing I want to...
Read more >Importance of CSS Specificity and its best practices
This slot is affected by inline styles. Any inline style will have precedence over any rule defined in an external CSS file, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Don’t know if this helps, I had a similar issue which was resolved once I disabled
experimental.inlineSSRStyles
;Using tailwind I defined for instance h1 tag like this in my main.scss:
Which worked before RC.10/11. After upgrading every h1 was overridden by default browser styles only when built.
It’s not resolved, moreover inlineSSRStyles now does nothing, it inlines styles incorrectly no matter if it’s true or false, I will prepare repro shortly