Co-op Foundations: Variables
Common global variables that all Co-op CSS Modules rely upon.
Dependencies (for PostCSS sources only)
How to use
- Install via
$ npm install @coopdigital/foundations-vars --save$ yarn add @coopdigital/foundations-vars
- Add CSS module to your application via a most appropriate method. This will entirely depend on your application and how you are currently loading CSS modules within it.
If you want to use global Media Query breakpoint variables, you have to include
src/vars.pcssin your build pipeline, as they will not be present in the postprocessed CSS file that you can find under
Here's a bunch of examples, showing how you can integrate this CSS module in your project, based on most popular types of project. You can either use a post-processed and pre-built CSS form the
dist directory, ot use PostCSS sources from the
The latter have two dependencies, which should be consumed by your frontend toolkit to postprocess the CSS correctly.
In Vue, you can just reference it from a global component like so:
</* Import PostCSS source */;/* Import postprocessed CSS distributable */;</