css - Global selector with box-sizing -


i read developers use box-sizing in global selector common practice whole web project. best practice or should avoided? , performance?

*{    -moz-box-sizing:border-box;   -webkit-box-sizing:border-box;    box-sizing:border-box;  }  

short answer: yes, fine use.

here optimized code snippet:

/* apply natural box layout model elements, allowing components change */ html {   box-sizing: border-box; } *, *:before, *:after {   box-sizing: inherit; } 

read here more:

http://www.paulirish.com/2012/box-sizing-border-box-ftw/


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -