Skip to content

:root.className[attr] selector #40

Description

@zanona

Hey guys, congrats for the initiative! Amazing work.

I was trying this on Chrome and it seems to work fine, but not sure if it follows the spec.
Although, I believe it would be a great addition if there could be a way to implement this perhaps?

input.css

  :root {
    --theme-color: blue;
  }
  :root.alt {
    --theme-color: green;
  }
  p {
    margin: 1em;
    color: var(--theme-color, red);
}

output.css

p  {
  margin: 1em;
  color: blue;
}
.alt p { color: green; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions