Property Conventions
Throughout this book, there are boxes that break down a given CSS property. These have been reproduced practically verbatim from the CSS specifications, but some explanation of the syntax is in order.
Throughout, the allowed values for each property are listed with a syntax like the following:
Value: [ <length> | thick | thin ]{1,4} |
| Value: [<family-name> , ]* <family-name> |
| Value: <url>? <color> [ / <color> ]? |
| Value: <url> || <color> |
Any words between < and >
give a type of value, or a reference to another property. For
example, the property font will accept values
which actually belong to the property font-family.
This is denoted by using the text “<font-family>.”
Any words presented in constant width text are keywords that must
appear literally, without quotes. The forward slash ( / ) and the
comma ( , ) must also be used literally.
Several keywords strung together means that all of them must
occur—in the given order. For example, help
me would mean that the property must use those
keywords in that exact order.
If a vertical bar ( X | Y ) separates alternatives, then any one of them must occur. A vertical double bar ( X || Y ) means that either X or Y, or both, must occur, but they may appear in any order. Brackets ( [...] ) are for grouping things together. Juxtaposition is stronger than the double bar, and the double bar is stronger than the bar. Thus “V W | X || Y Z” is equivalent to " [ V W ] | [ X || [ Y Z ]] .”
Every word or bracketed group may be followed by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access