Sorry to ask such a basic question, but in spite of the fact that I am not a professional webdesigner, but I already have some more elaborated personal websites than only show one static picture in one static page, I am completely confused, and I am fed up.
OK, that even if I do not put in the right order of CSS properties, the browser shows what I want, but I would like to know if there is an official order for the background properties.
W3 School says (It does not give all): background-color background-image background-repeat background-attachment background-position.
Mozilla Developer says: background-repeat background-attachement background-position / background-size background-origin background-clip background-image background-color;
Webfx says: background-image background-position / background-size background-repeat background-attachment background-origin background-clip background-color;
I give up going to look for the official order, because I am not able to decide myself which is the right official one.
Can you tell me how you know it, and from which website can say the official CSS rules ? Or, is there an official CSS statement that background properties order is not important ?
>Solution :
MDN links to the official specifications which say:
This specification follows the CSS property definition conventions from [CSS2] using the value definition syntax from [CSS-VALUES-3].
That then links to this document which describes, in detail, how to read the syntax definitions.
The most relevant part of that is:
A double bar (
||) separates two or more options: one or more of them must occur, in any order.