Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

font shorthand

/*Syntax*/
font: font-style font-variant font-weight font-size/line-height font-family;

/*In Use*/
font: italic small-caps normal 13px/150% Arial, Helvetica, sans-serif;

You need to supply at least 
1. font-size 
2. font-family 

body {
  font: italic 20px Serif; /* works */
  font: 20px; /* fails */
  font: 18em Fantasy; /* works */
  font: bold small-caps; /* fails */
}
Source by css-tricks.com #
 
PREVIOUS NEXT
Tagged: #font #shorthand
ADD COMMENT
Topic
Name
4+6 =