I am using PostCSS http://cssnext.io/ with my Next.js website combined with butterCMS. I am new to postcss but like what they are trying to do, however coming from a SASS background, I am finding it seems to be going down the rabbit hole of having to add a lot of additional modules and scripts in order to get it working which does not give it a major advantage over preprocessors.
<p className={classNames['my-paragraph']}>My homepage</p>
<p className={classNames.danger}> This background should be yellow</p>
<div>
<p className={classNames.giantext}> I am huge </p>
</div>
The remainder gives me the following warnings/errors:
(Emitted value instead of an instance of Error) postcss-custom-properties: /Users/user/projects/qubase/styles/styles.css:25:3: variable '--color-vue-green' is undefined and used without a fallback
Or
(Emitted value instead of an instance of Error) postcss-apply: /Users/user/projects/qubase/styles.css:16:3: No custom property set declared for `accessibly-hidden`.
etc
Only the composes directives are working with the remaining utilities and styling not being picked up by my index.js file. However if I add the contents of defaults.css directly into styles.css the styling works which meakes me think that the import directive is not working. Is there anything I am missing here?
I am using PostCSS http://cssnext.io/ with my Next.js website combined with butterCMS. I am new to postcss but like what they are trying to do, however coming from a SASS background, I am finding it seems to be going down the rabbit hole of having to add a lot of additional modules and scripts in order to get it working which does not give it a major advantage over preprocessors.
In my package.json I have the following modules:
In my root I have a
./styles/
folder with the following files:defaults.css
styles.css
In my react script I have:
The remainder gives me the following warnings/errors:
Or
etc
Only the
composes
directives are working with the remaining utilities and styling not being picked up by my index.js file. However if I add the contents ofdefaults.css
directly intostyles.css
the styling works which meakes me think that the import directive is not working. Is there anything I am missing here?