Dan Dan - 1 year ago 59
CSS Question

What css pseudo class should I use, to capture classes with a specific naming pattern?

For instance, is it possible to use one selector for the following classes

.bikes-panel, .cars-panel, .trucks-panel

such that you have a selector that looks like

.?????panel{ css code goes here}

Answer Source

*[class$="-panel"] will do what you're looking for, however only if the .???-panel is the last class named in the class attribute.