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

Giving a class the same values as another class

From: <pdf@bizfon.com>
Date: Tue, 25 Jul 2000 15:37:21 -0400
To: www-style@w3.org
Message-ID: <85256927.006BCA6E.00@Enterprise>

Is it possible (or are there any plans to make it possible) to include the
properties of one class inside the properties of another?  For example, suppose
I have a page that is part of a site.  There are certain site wide properties
that I may assign through a class (for example, if I want certain items
throughout the site to use a particular font).  But there are also properties
that are specific to that page that I don't want to be given to the entire site.
Those properties would be defined in a class that was local to that page only.
You can't declare something as having multiple classes (not that I know of
anyway), so it would be nice to be able to do something like this:

/* site.css */
/* This is a global style, used throughout the site */
.globalproperties { font-family: helvetica,sans-serif; }

<title>Hello World</title>
<link rel="stylesheet"  type="text/css" href="site.css">
<style type="text/css">
/* This is my local style, used on this page only */
/* Would be nice to INCLUDE global class in my local class like so */
.localproperties { color: red; classname: globalproperties; }
          <td class="localproperties">This is now RED and ARIAL!</td>

This is a very simplified example, but I think it gets my question across.  I
haven't seen any way to do something like this.  Is it possible?  Will it be
possible in the future?
Peter Foti
Received on Tuesday, 25 July 2000 15:37:40 UTC

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