Skip to content

Support for @layer? #340

@malectro

Description

@malectro

https://developer.mozilla.org/en-US/docs/Web/CSS/@layer

Very excited to try this library! I realize this is a pretty new CSS feature, but it looks like css-inline ignores layers. Is this something you think would be easy to add? I'd be happy to try to help.

My company is hoping to add them to our CSS as a way to avoid new stuff clashing with extremely specific legacy selectors, but everything we write has to be able to safely inline for email.

example:

<style>
@layer legacy {
  div > span {
    font-weight: bold;
    color: red;
  }
}
span {
  color: blue;
}
</style>
<div><span/></div>

result:

<html><head>
</head><body><div><span style="color: blue;"></span></div>
</body></html>

expected

<html><head>
</head><body><div><span style="font-weight: bold; color: blue;"></span></div>
</body></html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions