Multiple classes for more efficient CSS

If multiple CSS classes share identical attributes, it may be more efficient to remove those common attributes and add them to a new class. While this may result in more classes applied to HTML elements, making changes will be far more simple and efficient.


0:00 – Introduction

Overview of HTML and CSS in demo file.

0:42 – Condensing common CSS into single class

Streamlining code.

2:59 – Class order

In CSS, class order is important. If multiple classes applied to an element describe the same attribute, the attribute described by the last applied class will prevail.


Leave a Reply

Your email address will not be published. Required fields are marked *