When working with CSS, you have the option to combine sub-properties. For example, instead of defining a border like this:
border-style: solid;
border-width: 1px;
border-color: #555;
You can use a single declaration for the border
property as a shorthand:
border: solid 1px #555;
This shortcut method also applies to properties like background
, but it does not seem to work for font
. For instance, if you try to shorten font styling like so:
font: bold italic;
No style is applied at all. Why is that?