Do more specific css rules load better?
Posted
by bobobobo
on Stack Overflow
See other posts from Stack Overflow
or by bobobobo
Published on 2010-05-20T19:31:32Z
Indexed on
2010/05/20
19:40 UTC
Read the original article
Hit count: 135
css
|efficiency
You can do this:
.info
{
padding: 5px ;
}
Or, if you know it will be a div
, you can do this
div.info
{
padding: 5px ;
}
So, when there's a nested list.. you can do this..
div.info ul.navbar li.navitem a.sitelink
{
color: #f00;
}
Or you can do this
a.sitelink
{
color: #f00;
}
Readability aside, which is better for the browser to parse/run?
© Stack Overflow or respective owner