W3C home > Mailing lists > Public > www-style@w3.org > August 2008

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

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 27 Aug 2008 16:57:27 -0700 (PDT)
To: www-style@w3.org
Message-ID: <18423371.88851219881447364.JavaMail.root@cm-mail01.mozilla.org>


I think a simple addition makes the original example a little more interesting, add "Text E" after the <c> element.  Now you have:

  <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>
    Text E
    </b>
  </a>

With a font with just two weights, Text E will be bold in all scenarios.  If Text D is normal, then Text E will be lighter than text next to it in an element that should be bolder.

I don't think there's really a better answer here, either way there's a visual compromise.  In this situation I think it's best to keep the solution as simple as possible, so that authors can understand the behavior and implementors don't need to construct tricky code simply to handle edge cases like this.

Regards,

John
Received on Wednesday, 27 August 2008 23:58:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:11 GMT