+ 1
background shorthand order?
Is there any order in which shorthand operators are used for background attribute? ( background-clip: background-origin: background-size: background-color: background-image: background-repeat: background-attachment: background-position: ) For these is there any order?
1 Odpowiedź
+ 2
source: https://developer.mozilla.org/en-US/docs/Web/CSS/background
The background property is specified as one or more background layers, separated by commas.
The syntax of each layer is as follows:
+ Each layer may include zero or one occurrences of any of the following values:
<attachment>
<bg-image>
<position>
<bg-size>
<repeat-style>
+ The <bg-size> value may only be included immediately after <position>, separated with the '/' character, like this: "center/80%".
+ The <box> value may be included zero, one, or two times. If included once, it sets both background-origin and background-clip. If it is included twice, the first occurrence sets background-origin, and the second sets background-clip.
+ The <background-color> value may only be included in the last layer specified.