- From: Manos M. Batsis <manosb@profile.gr>
- Date: Mon, 15 Jan 2001 11:57:03 +0200
- To: <www-style@w3.org>
Thanks Vitali. I know about inheritance. The "template" idea was mentioned as a saver from the grouping mess. I'm sorry not to see anyone else providing comments on the idea though. Manos -----Original Message----- From: www-style-request@w3.org [mailto:www-style-request@w3.org]On Behalf Of Vitali Falileev Sent: Thursday, January 11, 2001 5:44 PM To: Manos M. Batsis Cc: www-style@w3.org Subject: Re: attribute templates Hello Manos, Your idea is very good! :) CSS has support for class inheritance: .classOne, .classTwo, .newclass { background-color: #f3f3f3; color: #ff0000; text-align: right; } .classTwo, .newclass { background-image: url(...); border: 1px solid #000000; } .newclass { border:2px solid #ff0000; } But when i want create new child class with a bit changes i need add it name to all definitions of his parents. This is uncomfortable. -- Best regards, Vitali Falileev mailto:falileev@itos.eu.org Thursday, January 11, 2001, 1:57:03 PM, you wrote: MMB> I think the ability of doing the following would bring css coding into a different level. MMB> Lets say i define a couple of classes as: MMB> .templateOne{ MMB> background: #f3f3f3; MMB> color:#ff0000; MMB> text-align:right; MMB> } MMB> .templateOne{ MMB> background-image:url(myImage.gif); MMB> border:1px solid #000000; MMB> } MMB> Now, to use these as templates in a new class i would do this: MMB> .newclass{ MMB> templates:.templateOne, .templateTwo; MMB> border:2px solid #ff0000; MMB> } MMB> Of course the attributes defined in .newclass supersedes the template ones. MMB> One other useful function would be importing templates from a different .css file like: MMB> .newclass{ MMB> templates:url(style2.css, .templateOne, .templateTwo) .template; MMB> border:2px solid #ff0000; MMB> } MMB> where template lies in the same stylesheet as .newclass. MMB> Just a thought... please do give some comments :-) MMB> Manos
Received on Monday, 15 January 2001 04:58:51 UTC