Closed Bug 720371 Opened 12 years ago Closed 12 years ago

Implement a new CSS property, 'class'

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 720355

People

(Reporter: spammed.user, Unassigned)

Details

Many style sheets use the same styles again and again, which is why the classes were invented. Unfortunately, many CSS3 properties don't allow the usage of class, so a new solution is needed to reduce style sheets' lengths, like implementing a -moz-class property that applies to any element with -moz-class:'className'; the 'className' class. e.g.

.class1 {
    /*
     lots of properties and values
     ...
    */
}
.class2 {
    /*
     lots of other properties and values
     ...
    */
}

@-moz-keyframes animation1 {
    0% { -moz-class:'class1'; width:0; } /*applies 'class1' (e.g. the classes 'c' and 'class1' will be applied to <div class="c" style="-moz-animation:animation1 4s;">). */

    50% { -moz-class:auto; width:500px; } /*applies the classes the element has by default (only 'c' will be applied to the above <div>). This is the default value. */

    100% {-moz-class:'class1','class2'; width:0; } /*applies 'class1' AND 'class2'. */
}

_________________________________________________ (this will be useful if it becomes a W3C recommendation):

.some-selector {
    /*
     lots of properties and values (written once instead of 5 times)
     ...
    */
}
:-moz-some-selector(...) {
    class:'some-selector';
}
:-webkit-some-selector(...) {
    class:'some-selector';
}
:-o-some-selector(...) {
    class:'some-selector';
}
:-ms-some-selector(...) {
    class:'some-selector';
}
:some-selector(...) {
    class:'some-selector';
}
How is this different from bug 720355?
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.