How do I override Elements Plus UI default styles in a production environment?
See original GitHub issueThis code is normal in the development environment, but it is overwritten by the Elements Plus UI style in the production environment and will not work.
<el-button h-14 text-4 mr-8 font-600 type="primary" p-x="6" @click="goLogin">
{{ t('website.home.getStart') }}
</el-button>
😵💫 So what should I do?
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Vue how to override css styles for element-ui - Stack Overflow
Open element.js in the plugins folder. Add import your styles after element-plus, like this: import ElementPlus from "element-plus"; ...
Read more >4 Ways to Override Material UI Styles | by John Au-Yeung
There are four main methodologies, implemented using pre-built components and hooks, for overriding styling in Material UI:.
Read more >Theming | Element Plus
Element Plus uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale,...
Read more >Styling Vue components with CSS - Learn web development
To start with, create a file called reset.css in the src/assets directory. Files in this folder get processed by Webpack. This means we...
Read more >Striking a Balance Between Native and Custom Select Elements
Clicking the box toggles the visibility of the options list (also called listbox). Clicking an option in the listbox updates the selected value ......
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 Free
Top 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
Methodologically, this is css issue. Libraries and UI libraries have their own way of importing additional css with their own ordering. If the import/apply order cannot be altered easily, you have to depend on how css resolve its specificity.
Okay, thank you, but I’m using on-demand import Element Plus’s style. And with the help of Sudongyuer, I used important to solve the problem, but I hope to find the fundamental solution ❤️