1

At the Wordpress Codex said next:

  • All possible HTML elements should be styled by your theme (unless it is a child theme), both in post/page content and in comment content.
    • Tables, captions, images, lists, block quotes, et cetera.

What elements actually should be styled by default in theme? The first things I thought about are h1-h6, paragraphs, lists, button, form inputs. But I absolutely believe it isn't complette list of these elements. What elements I also should necessarily styling in custom theme?

4
  • All of them really... if you're building a theme that someone else will use, whether that's a single or whether you're releasing the plugin to the public & could potentially have thousands of sites using it, you never know what HTML they'll add manually, via blocks, or other plugins. You don't have to come up with elaborate styles or anything, but simply ensure that graceful fallbacks are available for everything. A good start is to look at the underscores.me styles.css file: github.com/Automattic/_s/blob/… – Tony Djukic Mar 14 at 14:24
  • Underscores.me is what the WordPress team uses as a starter for the theme's they build for WordPress.com and for all of the 'Yearly' theme releases they do like 'Twenty TwentyOne', etc. – Tony Djukic Mar 14 at 14:25
  • Also the theme unit test data has sample content which uses most of the tags that could be used: make.wordpress.org/themes/handbook/review/theme-unit-test – Jacob Peattie Mar 14 at 14:42
  • I've already imported the themeunittestdata.wordpress.xml and must notice there are lot of elements and blocks. In themes on the Tempalte Monster I saw some themes with pages the typography or the elements contains styled elements from the xml mentioned above. I hope it will be enough if I styled elements imported from this xml. – Volodymyr Mar 14 at 14:47

Your Answer

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

Browse other questions tagged or ask your own question.