css-modules / postcss-icss-values

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

Modules values default value #53

Closed alansouzati closed 7 years ago

alansouzati commented 8 years ago

I tried to find in the README page how to assign a default value to a variable, but I could not find it in the docs.

This is more or less what I'm trying to achieve:

@value defaultFontSize from './font.css';
@value h1FontSize: defaultFontSize from '$(themePath)/shared/font.css';

In this case, if the fonts import from the theme does not have h1FontSize, I would assign the default value instead.

TrySound commented 7 years ago

@alansouzati Aliases like in es modules

@value defaultFontSize as h1FontSize from '$(themePath)/shared/font.css';