Re: min-font-size

On Mon, 19 Jul 1999 01:39:13 +0100 (BST), Ian Hickson
(py8ieh@bath.ac.uk) wrote:
> Maybe someone should just invent these rules and then we would have
> something concrete to discuss... ;-)

Here are the rules I've had in mind - which would be as close to
compatible with min-width and max-width as possible.  The rules in
section 6.4.1 of CSS2 [1] would be applied separately to all
declarations with priority ~= "minimum" and with priority ~= "maximum"
and other declarations.  Then, to find the computed value of the
property:

1. let max = the computed value computed from the specified value
  cascaded above for declarations with priority ~= maximum
2. let min = ... for declarations with priority ~= minimum
3. let comp = ... for declarations not used above
4. if comp > max, then let comp = max
5. if comp < min, then let comp = min

Problems with this approach:
  * saying there's no maximum (to override another declaration) would
    now require a new length value
  * there might be a better solution than the one currently used
    for (min|max)-width

Advantages with this approach:
  * it exactly mimics the behavior of (min|max)-width
  * it's easy to give something exactly in a user stylesheet (although
    perhaps the cascading rules could make this unnecessary):

      font-size: 20px ! important maximum minimum;


By the way, I might prefer a syntax such as:

    min(width): 20%;

but this is not allowed by the grammar [2].  Perhaps something like:

    @minimum {
      width: 20%;
    }

could be acceptable.

David

[1] http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order
[2] http://www.w3.org/TR/REC-CSS2/syndata.html#tokenization

L. David Baron     Rising Sophomore, Harvard     dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.        < http://www.fas.harvard.edu/~dbaron/ >
Summer Intern, Netscape - however, opinions are entirely my own, etc.

Received on Monday, 19 July 1999 21:33:15 UTC