{max|min}-font-size

I would like to propose two new properties for CSS:

min-font-size
max-font-size

The rules for choosing the actual font size would be the same as those
for selecting widths described in section 10.4 of CSS2 [1].  I think
these properties would be useful for user stylesheets, especially for
users who need special font sizes, but would still like to see font
size contrast.  A user who wanted larger fonts could then set:

BODY {
  font-size: 36px;
  }

* {
  min-font-size: 24px; /* To prevent problems with absolute units or
    with "font-size: 0.5em" */
  max-font-size: 120px;  /* To prevent 5em, etc. from being too big... */
  }

It could also be useful in user stylesheets for, say:

* { min-font-size: 9px ! important; }

to counteract the problems of badly designed web pages.

On the other hand, should there instead be a general syntax for
minimum and maximum values?  Something like:

min(font-size): 9px;
max(font-size): 5cm;

This could be resolved in the same way (see [1]), and ignored if the
property is not a length.

David Baron

[1] http://www.w3.org/TR/REC-CSS2/visudet.html#min-max-widths

-----------------------------------------------------------------
L. David Baron    Freshman, Harvard    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                < http://www.webstandards.org/css/ >

Received on Thursday, 18 March 1999 20:25:11 UTC