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

Re: author-defined color aliases

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 08 Jul 2003 23:27:18 +0200
To: "Eric A. Meyer" <eric@meyerweb.com>
Cc: www style <www-style@w3.org>
Message-ID: <3f1e363a.628880211@smtp.bjoern.hoehrmann.de>

* Eric A. Meyer wrote:
>    No, the end user doesn't.  The end user also doesn't need to know 
>that a color has been represented as rgb(50%,20%,80%) instead of 
>#8033CC, so should we get rid of the former?  Of course not.  All of 
>CSS is predicated, to at least a large degree, on developer 
>convenience.  If we wanted to make things harder for developers, we 
>would have just stuck with HTML-based presentation.  Or left out 
>@import and the ability to link stylesheets, so that the CSS had to 
>be embedded in the 'head' of every document.

That's actually kind of a solution as far as XHTML is concerned, try

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  [
    <!ENTITY foreground "rgb(0, 128, 255)">
    <!ENTITY background "rgb(255, 128, 0)">
    <!ENTITY block      "font: small-caps xx-large/3 Georgia, serif;
                         padding: 20px;">
    <!ENTITY smiley     "&#x263A;">
  ]>
  <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title></title>
      <style type='text/css'>
      p {
        color:            &foreground;;
        background-color: &background;;
        border:           &foreground; thick solid;
      }
      span { &block; }
      </style>
    </head>
    <body>
      <p>Hello <span style='color: &background;
      background-color: &foreground;'>World &smiley;</span>!</p>
    </body>
  </html>

in a browser supporting XHTML and CSS.
Received on Tuesday, 8 July 2003 17:27:33 GMT

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