Core idea: A control’s top element in the DOM has a “class” attribute that includes the names of all classes in the control’s class hierarchy. This enables the key ability of visually styling controls with CSS rules referencing specific control classes. This can also allow you to efficiently find controls of a given class, including controls that inherit from a class you’re looking for.
The web development platform uses the term “class” to refer to two completely different things: 1) JavaScript classes, and 2) DOM element classes styled with CSS. Each meaning gives rise to its own namespace of classes. QuickUI facilitates searching, manipulating, and styling controls by creating a correspondence between these two namespaces.
To this end, QuickUI sets the “class” attribute of a newly-instantiated control to include the names of all JavaScript classes in the control’s class hierarchy. The JavaScript class names will appear in order from most specific class to most general class. (Although all controls ultimately inherit from jQuery and Object, those names are not included in the list of class names.)
Among other things, this means that, if you want all instances of, say, BasicButton, to have a particular style, you can create a CSS rule for “.BasicButton”. You can also use jQuery with the selector “.BasicButton” to find all existing instances of BasicButton.
The demo code creates two buttons: one of the plain BasicButton class, and another of class LabeledColorSwatch, which inherits from BasicButton. The “class” attributes of these controls will reflect the class hierarchy of each. (You can verify this in the debugger.) The first control will have class=“BasicButton Control”, because a BasicButton inherits from Control. The second control will have class=“LabeledColorSwatch BasicButton Control”, because a LabeledColorSwatch inherits from BasicButton.
Your goal: Using a find() call similar to the one shown here, search for all LabeledColorSwatch instances by class name, then set their CSS so that “font-weight” is set to “bold”.