Closed
Description
Describe the bug
If modern CSS nesting syntax is used, it classnames are not recognized.
.content {
display: inline-flex;
@nest .fullscreen & {
max-height: 100%;
}
}
To Reproduce
Steps to reproduce the behavior:
- Have a css file with content listed above
- Have a postcss set up. Example postcss.config.js:
module.exports = {
plugins: [
require('postcss-preset-env')({
stage: 3,
features: {
'nesting-rules': true
}
})
]
};
- Use the
typescript-plugin-css-modules
plugin with configuration:
{
"name": "typescript-plugin-css-modules",
"options": {
"customMatcher": "\\.css$",
"postCssOptions": {
"useConfig": true
}
}
}
- Have a valid usage:
import styles from './styles.module.css';
console.log(styles.fullscreen); // TS2339: Property 'fullscreen' does not exist on type {content: string}
Expected behavior
.fullscreen
classname is recognized and useable