linaria icon indicating copy to clipboard operation
linaria copied to clipboard

Lazy loaded Linaria components have wrong specificity when decorated with `styled()`

Open jalooc opened this issue 7 months ago • 0 comments

Environment

  • Linaria version: 6.2.0
  • Linaria React version: 6.2.1
  • Bundler (+ version): Vite @5.2.13
  • Node.js version: v22.2.0
  • OS: MacOS

Description

When decorating Linaria components with styled(), the resulting class has proper specificity achieved by chaining classes: .classBaseComponent.classDecoratingComponent, but that does not work if the base component is lazy-loaded.

image image

Reproducible Demo

https://stackblitz.com/edit/stackblitz-starters-ldrzpa

jalooc avatar Jun 30 '24 20:06 jalooc