Re: min-font-size

Ian Hickson <py8ieh@bath.ac.uk> wrote:

>>> Unfortunately, to my knowledge noone has as yet worked out a suitable
>>> set of rules to make the cascade work well with !maximum and !minimum.
>>> (I do not know if anyone has even tried).
>On Sun, 18 Jul 1999, Oren Ben-Kiki wrote:
>> What is wrong with behaving as if each "attr: value" is a shorthand
>> for "attr: value ! minimum; attr: value ! maximum"? Cascading could
>> then be handled according to the current rules.
>
>Each property really needs three values; optimum, minimum and maximum
>(think of width, min-width and max-width).


I'm not sure this is really needed; you can get pretty far with just a
minimum/maximum approach. But let's take it as a given that CSS uses the
triplet values approach...

>> I'd be more worried about clearly defining what algorithm the browser
should
>> use to try to satisfy these constraints.
>
>It is this algorithm to which I was referring.


Just to clarify that there are are two problematic issues here. First, how
to decide on the values triplet (minimum, optimal, maximum) for an attribute
considering cascading, importance, inheritance, etc. I thought that was the
issue you referred to. Second, once such a triplet is known for each
attribute, how to determine the displayed value for each one. That's the one
I referred to.

The first is easier - there are obvious solutions which give a single
interpretation of a stylesheet in all cases:
- Adjust the allowed range so that the optimal value is in it, or
- Adjust the optimal value so it is in the allowed range.
- Something else? But still a very simple rule.
Which one is chosen isn't really, the point; the rule will still be simple
to follow and understand.

The second issue is harder. I can't really say what the set of solutions is;
there are several algorithms to search for a set of valid display values and
each one might give different results for an over/under constrained system.
Some algorithms actually employ some amount of randomness which means even
the same algorithm will give different results when run at different times.

On further thought, I guess that under constrained stylesheets won't be a
problem - a default value for the value triplet is always well defined in
CSS (but are they meaningful?). On the other hand, I can't tell off the top
of my head whether allowing each numeric attribute to have a minimal/maximal
value means that stylesheets can become over constrained. Maybe someone who
knows the specs better can comment on this? Is there already a coherent way
to deal with conflicting attributes?

Have fun,

    Oren Ben-Kiki

Received on Monday, 19 July 1999 03:55:12 UTC