admin管理员组文章数量:1332345
I'm developing my own Wordpress theme and I'm trying to make it as light as possible. I started from the Underscores starter theme, but they use normalize.css to reset the styles.
Is it necessary to include it in my theme or is there a better method?
I'm developing my own Wordpress theme and I'm trying to make it as light as possible. I started from the Underscores starter theme, but they use normalize.css to reset the styles.
Is it necessary to include it in my theme or is there a better method?
Share Improve this question asked May 7, 2019 at 13:08 Thessa VerbruggenThessa Verbruggen 2452 silver badges10 bronze badges 3- 1 It's a helpful thing to do for consistency of looks across browsers. not totally necessary, but could reduce the need for browser-specific design fixes later. I reckon it's a good thing, so have included it in my theme. – majick Commented May 7, 2019 at 13:12
- 1 It's not 'necessary', but it'll help you get consistent styles across browsers. The CSS in your theme can be literally anything you want, but there's a reason people use normalize. It helps. – Jacob Peattie Commented May 7, 2019 at 13:13
- I guess I'll keep it in there, just to be sure everything will look okay. I just wanted to reduce the amount of code in my theme. – Thessa Verbruggen Commented May 7, 2019 at 13:47
1 Answer
Reset to default 2Web standards are pretty good these days and IMO I don't think things like normalize are nearly as necessary as years ago.
I would recommend having a look through the CSS file and deciding for yourself.
You can always just grab what styles you think are relevant and include them in your own CSS. This will cut down on a dependency and make you more aware of what code you are including in your own theme.
Quick note: You can use caniuse to look up specific styles or tags you might have questions about.
For Example, normalize includes this CSS...
main {
display: block;
}
If you look up main HERE, you will see it was added to the spec late and could cause bugs in IE if you don't apply block
to it.
本文标签: Do I need normalizecss when developing my own Wordpresstheme
版权声明:本文标题:Do I need normalize.css when developing my own Wordpress-theme? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742246842a2440011.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论