Canonical order
In CSS,canonical order is used to refer to the order in which separate values need to be specified (orparsed) or are to beserialized as part of a CSS property value. It is defined by the formalsyntax of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value.
For example,background shorthand property values are made up of severalbackground-* longhand properties. The canonical order of those longhand values is defined as
background-imagebackground-positionbackground-sizebackground-repeatbackground-attachmentbackground-originbackground-clipbackground-color
Furthermore, its syntax defines, that if a value for thebackground-size is given, itmust be specifiedafter the value for thebackground-position, separated by a slash. Other values may appear in any order.
In this article
See also
- CSS value definition syntax
- What does "canonical order" mean with respect to CSS properties? on Stack Overflow provides useful further discussion.