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"
    <!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">
      <style type='text/css'>
      p {
        color:            &foreground;;
        background-color: &background;;
        border:           &foreground; thick solid;
      span { &block; }
      <p>Hello <span style='color: &background;
      background-color: &foreground;'>World &smiley;</span>!</p>

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:08 UTC