admin管理员组文章数量:1327660
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
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
Share Improve this question edited Sep 16, 2017 at 5:57 AashikP asked Sep 16, 2017 at 3:59 AashikPAashikP 757 bronze badges 3- I am not sure there is any specific "rule" being followed – Mark Kaplun Commented Sep 16, 2017 at 5:27
- So its all just random? Pardon me, I'm fairly new to WP styling. – AashikP Commented Sep 16, 2017 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 Commented Sep 16, 2017 at 5:59
1 Answer
Reset to default 0I would suggest looking into the ways that the various units function. There would rarely be a case where you would use one unit exclusively. I generally use ems, rems, and %.
This article may help get you started: understanding and using rem units in css
本文标签: WordPress default theme css units
版权声明:本文标题:WordPress default theme css units 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742227882a2436666.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论