W3C home > Mailing lists > Public > www-style@w3.org > February 2000

UI: Sizing fonts relative to UI fonts

From: Braden N. McDaniel <braden@endoframe.com>
Date: Tue, 15 Feb 2000 14:46:57 -0500 (EST)
To: www-style@w3.org
Message-ID: <Pine.LNX.4.10.10002151432230.31526-100000@boneone.endoframe.com>
This query has evolved from this discussion:

  <URL:news://news.mozilla.org/881qts%248qt4%40secnews.netscape.com>

Jonas Sicking has pointed out this problem.

In its description of the 'font' property, CSS2 includes the language:

  System fonts may only be set as a whole; that is, the font family, size,
  weight, style, etc. are all set at the same time.These values may then
  be altered individually if desired.

So if I want to use a system font with a particular size, I could do

  selector {
    font: caption;
    font-size: 11pt
  }

Using points here is probably bad form, considering I'm probably designing
for screen display if I'm interested in UI fonts. And I most likely want
my font size to be relative to what the user has selected as their default
UI font size:

  selector {
    font: caption;
    font-size: 1.1em
  }

But this won't do what I want: the font size is relative to the parent
element, not to the default size for 'caption'. To get what I want, I'd
need

  parent {
    font: caption
  }
  
  parent child {
    font-size: 1.1em
  }

Yuck. I'm introducing markup just to get the style I need. Bad.

Have there been any proposals which would address this problem? It seems
like it might be handy to have a way to go to a sort of alternate
inheritance model.

-- 
Braden N. McDaniel
braden@endoframe.com
<URL:http://www.endoframe.com>
Received on Tuesday, 15 February 2000 14:45:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:03 GMT