Why should the shorthand for font property be in this sequence?
font: font-style font-weight font-size font-family
Why should the style and weight come before the size?
Why should the shorthand for font property be in this sequence?
font: font-style font-weight font-size font-family
Why should the style and weight come before the size?
Copyright © 2021 Jogjafile Inc.
The answer might not be what you're looking for, but it is an answer nonetheless.
The reason why is because that is how the specification defines the
fontproperty.The specification states that font-style, font-variant, and font-weight must come before font-size.
The specification further states:
So, while many short-hand properties typically only require a specific order when the values are of a similar type, the font shorthand is defined in a specific order because they wanted to keep consistency with how other applications and software had defined font properties.