Jump to content

Why would a style sheet contain a list of elements with an empty declaration block?


Carneno

Recommended Posts

Hello, I'd like to know why a style sheet would contain a rule set with a list of comma seperated elements ending in an empty declaration block. This is in a Style sheet that I did not develop. Like this: .block-category-navigation,.block-manufacturer-navigation,.block-recently-viewed-products,.block-info{} Any help would be gratefully appreciated. Thanks,Tony

Link to comment
Share on other sites

Looks to me like they just never added any rules in. The "block-category-navigation", "block-manufacturer-navigation", "block-recently-viewed-products" and "block-info" classes are being told to not do anything by the lack of rules between the "{" and "}". I don't think there's a particular reason for this. Maybe just absent mindedness, or a reminder to the coder to add in rules later down the road.

Edited by Coaxsist
Link to comment
Share on other sites

I hear waht you are saying, but why would these be in right after that rule set?

.block-category-navigation .active a,.block-manufacturer-navigation .active a{color:#f93;font-weight:700;text-decoration:none;}.block-category-navigation .listbox ul .active,.block-manufacturer-navigation .listbox ul .active{font-weight:700;}.block-category-navigation .listbox ul .inactive,.block-manufacturer-navigation .listbox ul .inactive{}.block-recently-viewed-products a:hover{font-weight:700;text-decoration:none;color:#f93;}

Thanks,Tony

Link to comment
Share on other sites

Those rules look like they're applying themselves to links.For example: [.block-category-navigation .active a] is any link in any state within an element with the class of "active" within an element with the class of "block-category-navigation". Other than laziness, a reminder, or accounting for every state of an element in the CSS, I honestly couldn't tell you. Other people's code is so weird... :P

Edited by Coaxsist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...