Implement a new CSS property, 'class'

RESOLVED DUPLICATE of bug 720355

Status

()

Core
CSS Parsing and Computation
--
enhancement
RESOLVED DUPLICATE of bug 720355
6 years ago
6 years ago

People

(Reporter: spammed.user, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 720355
You need to log in before you can comment on or make changes to this bug.