Skip to content

[selectors-4] selector inheritance? #3560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flavi1 opened this issue Jan 27, 2019 · 3 comments
Closed

[selectors-4] selector inheritance? #3560

flavi1 opened this issue Jan 27, 2019 · 3 comments

Comments

@flavi1
Copy link

flavi1 commented Jan 27, 2019

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;"

@bradkemper
Copy link
Contributor

How about this?

https://tabatkins.github.io/specs/css-nesting/

@jonjohnjohnson
Copy link

I'm guessing you can close this as a duplicate and add your concerns/suggestions to issues already filed...

@flavi1
Copy link
Author

flavi1 commented Jan 27, 2019

Oh... Sorry for duplication, and thanks for the related links.

@flavi1 flavi1 closed this as completed Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants