Using the CSS @layer rule in my Angular project

385 views Asked by At

I want to use the CSS @layer rule in my Angular project.

The priority order of @layers depends on their declaration order (the last one declared takes precedence). However, Angular automatically manages the order of component imports in the DOM. This can interfere with my layer declarations because I cannot control the CSS priority order (in the components stylesheets).

If someone can help me, I would like to know:

  • How can I use the @layer CSS rule in an Angular project with many components?
  • Especially, is there a way to declare the order of my layers in a special stylesheet that would be imported before all components (to have full control over CSS priority order)?

I couldn't find any info on the internet and had difficulty finding documentation on how angular imports components into the dom

0

There are 0 answers