Say my css looks like so:
#StoreIndexMain .LeftSideControl
{
padding-top: 35px;
background-color:#FFFFFF;
width:78px;
float:left;
height: 58em;
}
#StoreIndexMain .LeftSideControl:Hover
{
opacity: .6;
background-color: #ebebeb;
}
I was hoping maybe there’s something like:
#StoreIndexMain
(
.LeftSideControl {}
.LeftSideControl:Hover {}
)
Unfortunately, no. Every selector is an independent unit. CSS doesn’t (currently) allow for that type of selector specification (though I can see where it might prove useful; put in a recommendation for the next CSS specification and let the community have at it).
Edit: However, in the interim you can use a CSS preprocessor to get such features. SASS is one such popular preprocessor. This particular feature would be Nesting.