1

Is there a specific rule the default WordPress themes follow for CSS units?

I see em's on some font sizes and rems on others and px on certain places.

Referred the following links but I couldn't find the actual reference to the rule they use for their CSS units: why does twenty eleven theme mix up the css measurement units? Why do Wordpress default themes specify fonts in so many places?

Edit: By rule, I meant, for eg: Always follow the unit system of - px for borders, em for spacing etc

  • I am not sure there is any specific "rule" being followed – Mark Kaplun Sep 16 '17 at 5:27
  • So its all just random? Pardon me, I'm fairly new to WP styling. – Aashik Sep 16 '17 at 5:54
  • would not call it "random", I assume it is based on the experience which the theme developer(s) has and what kind of feedback they receive. Keep in mind that CSS best practices keep changing from time to time. – Mark Kaplun Sep 16 '17 at 5:59

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.