-
Notifications
You must be signed in to change notification settings - Fork 417
Closed
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro providedneeds: triage 🏷Issue needs to be checked and prioritizedIssue needs to be checked and prioritized
Description
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

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro providedneeds: triage 🏷Issue needs to be checked and prioritizedIssue needs to be checked and prioritized