You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daniel Toman edited this page Dec 30, 2016
·
4 revisions
Adjoining classes, sometimes also called class chaining, look like .foo.bar. While technically allowed in CSS, these aren't handled properly by Internet Explorer 6 and earlier. IE will match the selector as if it were simply '.bar' which means your selector will match more frequently than you intend it to and create cross-browser bugs.
Generally, it's better to define styles based on single classes instead of based on multiple classes being present. Consider the following:
That new class, baz, must now be added to the original HTML element. This is actually more maintainable because the .baz rule may now be reused whereas the .foo.bar rule could only be used in that one instance.
Rule Details
Rule ID: adjoining-classes
This rule is intended to flag uses of adjoining classes that will fail in Internet Explorer 6 and earlier.