parcel-plugin-typed-css-modules icon indicating copy to clipboard operation
parcel-plugin-typed-css-modules copied to clipboard

Add support for `@value` variables

Open r0skar opened this issue 6 years ago • 0 comments

In addition to exporting classNames, we can also export variables in CSS Modules. However, these are not included in the declaration file. Here is a minimal example of what I mean:

/* style.css */
@value bgColor: cadetblue;
/* index.ts */
import styles from './style.css'

// {bgColor: "cadetblue"}
console.log(styles)

Current behaviour:

/* style.css.d.ts */
// empty...

Expected behaviour:

/* style.css.d.ts */
export const bgColor: string

r0skar avatar Mar 07 '19 11:03 r0skar