你不应该对此如此偏执。更重要的是要有一个好的和干净的代码,避免黑客攻击。但有一些基本规则:
#main-navigation { } /* Never style ID's directly, use classes instead*/
body.home #page-wrap { } /* If you ever have to style ID's, do it directly, they are unique and doesn't need any selector. You're just wasting bytes */
.main-navigation { } /* No problem at all, but try to be more abstract. a class should not be so specific, try to reuse code as much as you can.*/
ul li a.current { } /* You should optimize this, you could use just ul .current. Try to use as little selectors as you can, it'll have good performance and will be easier to deal with. Try to use just 3 selectors at the max, so you''l have a good performance and clean code. */
ul { } /* No problem here */
* { } /* You'll won't have any serious problem if you use with caution. Properties like border-box are a good use of it. Anything that you have to set globally in your stylesheet is welcome to use it. */
#content [title='home'] /* Same as *. Don't overdo and you're good to go. */
更重要的是尽可能拥有更简洁的代码。尽量避免过多的覆盖、未使用的代码、过多的选择器、重复的代码和黑客攻击。一件好事是使用OOCSS和BEM。如果您使用框架,请尝试使用像inuit.css这样坚持良好实践的东西。
请记住,即使是智能手机今天也非常强大,只要您不过度使用大量动画、未优化的代码、大量 javascript,您应该没有真正的问题。
Ps.:如果您使用动画,请坚持使用 CSS3 过渡和动画,因为它们很有可能会被 GPU 加速并获得更好的性能。