W3C home > Mailing lists > Public > www-style@w3.org > July 1999

Re: min-font-size

From: Oren Ben-Kiki <oren@capella.co.il>
Date: Mon, 19 Jul 1999 09:46:14 +0200
Message-ID: <017b01bed1ba$c74df5d0$5402a8c0@oren.capella.co.il>
To: "www-style" <www-style@w3.org>
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
>> 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:50 UTC