Several classes can make it easier to add special effects to elements without having to create a completely new style for this element. For example, you might want to quickly move items left or right. You can write two classes: "left" and "right" with "float: left"; and "float: right;" in them. Then whenever you have an element, you need to swim to the left, you just add the class "left" to its list of classes.
I like to use several classes for the things that I want to keep standard for the whole site. For example, if I always need a bottom edge for elements that need a bottom edge of 10 pixels. By creating a class that covers only the bot mark: 10px; I can add it where necessary.
Disadvantages of several classes
While they are supported in major browsers, really old browsers do not support them. Therefore, you must make sure that the first class you list is the one that has the most specific information for this element.
Several classes can also become really confusing as you apply more and more to an element.
More details ...
Summary:
- Reduce the total number of selectors (including IE related styles: .ie7 .foo.bar)
- Avoid generic selectors (including unqualified attribute selectors: [Type = "URL"])
- Increasing the page affects CSS performance in some browsers (e.g. Opera).
- Window size affects CSS performance in some browsers (e.g. Chrome).
- Page reloading can adversely affect CSS performance in some browsers (e.g. Opera)
- "border-radius" and "transform" are some of the most expensive properties (at least in WebKit and Opera)
- The Timeline tab in WebKit-based browsers can shed light on the general recalc / reflow / repaint times
- WebKit selection compatibility is much faster
http://perfectionkills.com/
source share