Environment
- Linaria version: 6.3.0
- Bundler (+ version): Vite 7.1.1
- Node.js version: 22
- OS: MacOS
Description
The button is still grey instead of the className style taking precdence because for some reason the class of SecondaryButton is a more specific chained class instead of just .s1llctjr:
The button should be green.
Reproducible Demo
import { styled } from '@linaria/react';
import { css } from '@linaria/core';
export function App() {
return <SecondaryButton className={greenButtonStyle}>Hello</SeconaryButton>;
}
const Button = styled.button`
background: red;
`;
const SecondaryButton = styled(Button)`
background: grey;
`;
const greenButtonStyle = css`
background: green;
`;
https://stackblitz.com/edit/vitejs-vite-na95ejhg?file=src%2FApp.tsx&terminal=dev

Environment
Description
The button is still grey instead of the
classNamestyle taking precdence because for some reason the class ofSecondaryButtonis a more specific chained class instead of just.s1llctjr:The button should be green.
Reproducible Demo
https://stackblitz.com/edit/vitejs-vite-na95ejhg?file=src%2FApp.tsx&terminal=dev