Order of classes


#1

Hello !

Does the order of “classes” in a “div” important operation Semantic?

Regards,
Val.


#2

It does matter in some cases.

You can look at some of the discussions the semantic-ui creators and contributors had about the word-order issue back when 1.0 was being released: https://github.com/Semantic-Org/Semantic-UI/issues/396

Tip: Be careful to follow the word order especially when you are using grids.

From the documentation:

Grids include many variations for adjusting things like vertical or horizontal alignment, text alignment, or default gutter sizes.

Some multi-word variations, like left floated or right aligned are word-order dependent and require you to use adjacent class names.

A rule of thumb: Never mess up the word order for a multi word class (right floated, left floated).


#3

In a word, often doesn’t matter, but does matter in several cases, so generally try and follow the order you’ll find in Semantic doc examples. If something isn’t working right, double-check for a word order issue should be in your troubleshooting toolbox.