Suppose I define two classes in a CSS file with the same name, like
.ui-widget {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
font-size: 1.1em/*{fsDefault}*/;
}
.ui-widget .ui-widget {
font-size: 1em;
}
Actually I found this code in a jQuery UI file. Why are there two classes? What is the difference if we write it like the following?
.ui-widget {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
font-size: 1.1em/*{fsDefault}*/;
font-size: 1em;
}
The
.ui-widget .ui-widgetwill only apply on the.ui-widgetelement which is by itself nested in another.ui-widgetelement.E.g.