PostCSS Mixin From
PostCSS plugin which enhances postcss-mixins with the ability to inline import from other files.
Input:
/* button.trait */@
Output:
@
Usage
This plugin is environment-independent. It must be provided the ability to load other CSS files by the end user.
An example using SystemJS:
const getFileText = { const isBundling = typeof window === 'undefined'; let absolutePath = filePath; if isBundling && filePath0 === '.' absolutePath = path; // css.source.input.from is incorrect when building. Need to convert from relative and then drop root // so that when giving the path to SystemJS' fetch it works as expected. absolutePath = absolutePath; const canonicalParent = relativeToPath; return System ;};
Be sure to run this plugin before postcss-mixins.
const mixinFrom = ;const mixins = ;
See PostCSS docs for examples for your environment.