This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29368 - font-size, font-family listed as optional values to Font property
Summary: font-size, font-family listed as optional values to Font property
Status: RESOLVED INVALID
Alias: None
Product: CSS
Classification: Unclassified
Component: Fonts (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: John Daggett
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 04:40 UTC by Tristan Bailey
Modified: 2016-01-12 10:17 UTC (History)
2 users (show)

See Also:


Attachments

Description Tristan Bailey 2016-01-12 04:40:53 UTC
Although widely accepted as required values to the shorthand Font property, the Font-Size and Font-Family values are currently listed as being optional (encapsulated in square brackets), with no mention about them being required. Why?

Extract from Font CR:
[ [ <‘font-style’> || <font-variant-css21> || <‘font-weight’> || <‘font-stretch’> ]? <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ] | caption | icon | menu | message-box | small-caption | status-bar
Comment 1 John Daggett 2016-01-12 05:03:55 UTC
You're not reading the syntax correctly. The font-size plus font-family values are both required *unless* a system font is used. Reformat the expression as below to see this:

[ 
  [ <‘font-style’> || <font-variant-css21> || <‘font-weight’> || <‘font-stretch’ ]?
  <‘font-size’> [ / <‘line-height’> ]? 
  <‘font-family’> 
] 
| caption | icon | menu | message-box | small-caption | status-bar
Comment 2 Tristan Bailey 2016-01-12 05:44:30 UTC
Thanks for your reply, John. I now understand that square brackets have a different meaning to what I am used to.