linaria
linaria copied to clipboard
Lazy loaded Linaria components have wrong specificity when decorated with `styled()`
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.
Reproducible Demo
https://stackblitz.com/edit/stackblitz-starters-ldrzpa