0

Is there a best practice of implementing resets for front-end code? In back-end I can assume WP will handle reset itself, but I can’t be sure that front-end theme will have a reset (most likely it will).

How would one approach this? I don’t want to add a full reset for just one section, but I also don’t want to style for inconsistencies which should be done with reset.

  • what exactly do you mean in "reset" – Mark Kaplun Oct 31 '17 at 13:44
  • @MarkKaplun Something like normalize.css – Runnick Oct 31 '17 at 13:45
  • why would you want to do that? you styling should blend with the theme, not "nullify" it – Mark Kaplun Oct 31 '17 at 13:48
  • Maybe your don't have the good approach. Plugins are designed to handle data and themes manage apparence of the frontoffice. – mmm Oct 31 '17 at 14:09
  • @mmm If I’m adding a complex gallery layout, how can I be sure theme will manage its appearance? – Runnick Oct 31 '17 at 14:14
1

In a plugin your styling should blend with the styling of the theme and not override it, therefor style "reset" is just not something you should do. On the contrary, it is better to have an option in your plugin to emit just HTML with no styling at all as it is hard to style anything in a way which will look good on all themes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.