Open Bug 1879900 Opened 2 years ago Updated 4 days ago

Move layers and media queries in the tokens files

Categories

(Toolkit :: Themes, task, P3)

task

Tracking

()

People

(Reporter: tgiles, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp] [acorntractors])

Once Bug 1879349 lands, we should move the layers and media queries to the top :root, :host(.anonymous-content-host) selector. This will make our code more in line with the accessibility guidelines for creating more maintainable front-end code.

Whiteboard: [recomp]
Whiteboard: [recomp] → [recomp] [acorntractors]

These layers are now created in tokens-config.js

The layer names could all remain un-nested, or if we want to nest the layer names they'd switch from - separators to .s

@layer tokens {
  :root {
    @layer foundation {} /* tokens.foundation */
    @layer prefersContrast { /* tokens.prefersContrast */
      @media (prefers-contrast) {}
    }
}
You need to log in before you can comment on or make changes to this bug.