Carneno Posted December 9, 2012 Share Posted December 9, 2012 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 More sharing options...
knystrom18 Posted December 9, 2012 Share Posted December 9, 2012 (edited) 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 December 9, 2012 by Coaxsist Link to comment Share on other sites More sharing options...
Carneno Posted December 9, 2012 Author Share Posted December 9, 2012 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 More sharing options...
knystrom18 Posted December 11, 2012 Share Posted December 11, 2012 (edited) 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... Edited December 11, 2012 by Coaxsist Link to comment Share on other sites More sharing options...
dsonesuk Posted December 11, 2012 Share Posted December 11, 2012 It probably had a styling for elements with class .inactive, but the user did not want this styling anymore, just the normal, so he just removed the styling for that class so it would not change. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now