Re: [css3-fonts] Nested 'bolder' and 'lighter' question

On Wed, Aug 27, 2008 at 4:17 PM, Simetrical <> wrote:

> On Wed, Aug 27, 2008 at 2:23 PM, fantasai <>
> wrote:
> > fantasai wrote:
> >>
> >> Given
> >>
> >>  <a>
> >>    Text A
> >>    <b style="font-weight: bolder">
> >>      Text B
> >>      <c style="font-weight: bolder">
> >>        Text C
> >>        <d style="font-weight: lighter">
> >>          Text D
> >>        </d>
> >>      </c>
> >>    </b>
> >>  </a>
> >>
> >> If you have three different weights in your font (normal, bold,
> >> extra-bold) then
> >>  - Text A will be normal
> >>  - Text B will be bold
> >>  - Text C will be extra-bold
> >>  - Text D will be bold
> >>
> >> If you have only two weights in your font (normal, bold) then
> >>  - Text A will be normal
> >>  - Text B will be bold
> >>  - Text C will be bold
> >>
> >> What should Text D be? Bold or normal?
> Well, if someone is using "bolder" n times in a row, they probably
> assume that there are at least n fonts bolder than the default one.
> So the intended effect is almost certainly the first case: normal,
> bold, extra-bold, bold.  Otherwise, why would you have the second
> "bolder"?  So the ideal behavior is clear.
> The problem is: what's the closest we can get to this ideal?  One
> angle would be to say that the closest you could get is normal, bold,
> bold, bold.  This is an obvious route.  The problem is, then you're
> effectively ignoring two distinctions you were asked to make: two of
> the rules are no-ops.  If you make it normal, bold, bold, normal, then
> only one of the rules is a no-op, which is in a way closer.  To take
> this line of thought to an extreme, an even closer representation
> would be (assuming a "light" font exists) light, normal, bold, normal,
> which preserves all rules -- just shifted down.  (But that's not
> really practical.)

You're looking specifically at weight changes, and measuring the number of
defects where a weight change is expected to occur and does not.  I don't
believe this is a useful metric, though.  Consider this markup:

  Text A
  <b style="font-weight: bolder;">
    Text B
    <c style="font-weight: bolder;">
      Text C
    Text D

In an ideal world, Text C would be extra-bold.  If your font does not have
an extra-bold weight, though, C will be merely bold.  This is completely
uncontroversial, and clear from both spec and common sense.  However,
according to your metric this example has two defects as well, as Text C
should be darker than Text B (it isn't) and Text D should be lighter than
Text C (it isn't).  Would your conclusion, then, be to lighten Text D?

I feel a more reasonable metric is to measure the weight *value* defects,
rather than the weight *change* defects.  This would give my provided code a
single defect, which seems reasonable.  Looking at the OP's code, making
Text D bold would give it a single defect, while making it normal would give
it two defects.

The question is one of intent, I think.  What are some cases where
> this actually comes up?  What sorts of semantics would most often
> dictate the use of nested bolder/lighter?  I can't come up with an
> example that's not pretty contrived.

Simple real-world example - nested <strong> tags, for extra-special


Received on Wednesday, 27 August 2008 23:11:30 UTC