[csswg-drafts] [selectors-4] selector inheritance? (#3560)

flavi1 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors-4] selector inheritance? ==
Hello.
Should it be great to integrate LCSS selector inheritance to CSS4 spec?
(idea from https://github.com/flavi1/lcss)

Example
=======

Just transform this :
```
@(#parent1) {
  @(.sub1.myClass > span, .sub2.active) {
    body { color: #888; }
    @media print {
      body { color: #333; }
    }
  }
  @(.sub3) {
    code { color: red; }
  }
  code { color: blue; }
}

@(#parent) {
  .sous-style {
    display: none;
  }
}
```

To this :

```
#parent1 .sub1.myClass > span body, #parent1  .sub2.active body {
 color: #888; 
}

@media print {
#parent1 .sub1.myClass > span body, #parent1  .sub2.active body {
 color: #333; 
}


}

#parent1 .sub3 code {
 color: red; 
}

#parent1 code {
 color: blue; 
}

#parent .sous-style {

    display: none;
  
}

```

Think about playing with  css files importations,  "var(--my-var, defalut_val)", and "--my-var: assigned_val;"


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3560 using your GitHub account

Received on Sunday, 27 January 2019 20:17:48 UTC