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

Re: Giving a class the same values as another class

From: <pdf@bizfon.com>
Date: Tue, 25 Jul 2000 16:39:57 -0400
To: "John Lewis" <john@gleemax.com>
cc: www-style@w3.org
Message-ID: <85256927.007185AF.00@Enterprise>


I'm not quite sure I understand your solution.  :)
It looks like you are simply including the global style sheet twice (using two
different methods) and then modifying the global style.  That's not what I'm
trying to do.  I want a local class which has the same characteristics as a
global class, without modifying the global class (so that the global class can
be used elsewhere on this page).
Pete





"John Lewis" <gleemax@hotpop.com> on 11/25/99 04:11:37 PM

Please respond to "John Lewis" <john@gleemax.com>

To:   www-style@w3.org
cc:    (bcc: Peter Foti)

Subject:  Re: Giving a class the same values as another class



I'm not quite sure I understand your problem, but I have a possible
solution:

/* site.css */
globalproperties { font-family: helvetica,sans-serif; }


<html>
<head>
<title>Hello World</title>
<link rel="stylesheet"  type="text/css" href="site.css">
<style type="text/css">
@import url(site.css)
/* import the rules defined in site.css */
globalproperties { color: red; }
/* and append the local declarations to the selector */
</style>
</head>
<body>
<table>
     <tr>
          <td class="globalproperties">This is now RED and ARIAL!</td>
     </tr>
</table>
</body>
</html>


----- Original Message -----
From: <pdf@bizfon.com>
To: <www-style@w3.org>
Sent: Tuesday, July 25, 2000 1:37 PM
Subject: Giving a class the same values as another class


:
:
: 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; }
:
:
:
: <html>
: <head>
: <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; }
: </style>
: </head>
: <body>
: <table>
:      <tr>
:           <td class="localproperties">This is now RED and ARIAL!</td>
:      </tr>
: </table>
: </body>
: </html>
:
:
:
: 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?
: Thanks,
: Peter Foti
Received on Tuesday, 25 July 2000 16:40:22 GMT

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