Is it improper to give a single class conflicting properties based on the parent element? I know this "works" but I’m wondering if it’s considered poor practice.
(I realize in this example you could just remove the li class and define them as "ul.groceries li", but assume the li class is necessary, for instance if we had to define multiple line items)
This reply has been reported for inappropriate content.
That’s totally fine. There’s no conflict because in the CSS you’ve defined different parent elements.
I agree with daGUY on thisâ€”your code looks and is fine (besides the unnecessary li class, of course, but you said you need that).
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed