I'm developing a widget for wp elementor as a plugin. Now my widget front view css and the theme front view css are in conflict. Right now as a developer how can I avoid wp plugin front view css and theme front view css conflict?
I'm developing a widget for wp elementor as a plugin. Now my widget front view css and the theme front view css are in conflict. Right now as a developer how can I avoid wp plugin front view css and theme front view css conflict?
Share Improve this question edited Jan 18, 2022 at 8:53 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Jan 18, 2022 at 6:42 FERDAUSSK 01FERDAUSSK 01 1 1- 3 There’s no magic trick. You just need to write your CSS rules with appropriate specificity so that rules you want to be overwritten can be while important CSS is not overwritten. – Jacob Peattie Commented Jan 18, 2022 at 7:10
1 Answer
Reset to default 5You can/should prefix all your classes. That way you have very limited chance to have conflicting classes, which can cause unexpected behaviour on the front-end. So, instead of .container
, you can use .mypluginprefix_container
.