css-modules / postcss-icss-values

Pass arbitrary constants between your module files
MIT License
203 stars 18 forks source link

Always imports values as string #110

Open pattiereaves opened 6 years ago

pattiereaves commented 6 years ago

When I do this:

/* foo.css */
@value numberOfColumns: 5;

/* foo.js */
import { numberOfColumns } from foo.css

the value of numberOfColumns will be a string ("5") instead of a number. Is there a better way to make it a number than having to add

/* foo.js continued */
const numberOfColumnsAsARealNumber = parseInt(numberOfColumns);