Environment
@linaria/postcss-linaria: 8.1.1
- Stylelint: 17.14.1
- PostCSS: 8.5.23
- Node.js: 24.16.0
- OS: macOS
Description
stylelint --fix drops the . in front of an interpolated class selector, turning a class selector into a type selector:
- .${a} { color: red; }
+ ${a} { color: red; }
This reproduces with zero Stylelint rules configured, so the corruption happens during the parse/stringify round trip. Nothing is reported, and the compiled CSS silently targets a different element.
Reproduction
.stylelintrc.mjs:
export default {
customSyntax: '@linaria/postcss-linaria',
rules: {},
};
sample.style.ts:
import { css } from '@linaria/core';
const a = 'some-class';
export const style = css`
.${a} { color: red; }
`;
Run:
stylelint --config .stylelintrc.mjs --fix sample.style.ts
Expected:
Actual:
Environment
@linaria/postcss-linaria: 8.1.1Description
stylelint --fixdrops the.in front of an interpolated class selector, turning a class selector into a type selector:This reproduces with zero Stylelint rules configured, so the corruption happens during the parse/stringify round trip. Nothing is reported, and the compiled CSS silently targets a different element.
Reproduction
.stylelintrc.mjs:sample.style.ts:Run:
Expected:
.${a} { color: red; }Actual:
${a} { color: red; }