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 Thursday, 11 January 2001 10:34:50 UTC