
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@coopdigital/css-foundations
Advanced tools
Co-op CSS Foundations contains all the core CSS styles needed to build Co-op branded digital content. It brings together all the packages projects will need in one place. Components and custom styles should be included or written separately and decided on a project by project basis.
The foundations set the basic Co-op look and feel - they should be included in all Co-op services.
Install via NPM:
$ npm install @coopdigital/css-foundations --save
You can include CSS Foundations in your project by referencing it from your existing CSS via @import statement, i.e.:
@import "node_modules/@coopdigital/css-foundations/dist/foundations.css";
If you use PostCSS in your build pipeline, you can reference the sources directly like so:
@import "node_modules/@coopdigital/css-foundations/src/foundations.pcss";
If you use a postcss-import plugin, it gets even easier:
@import "@coopdigital/css-foundations";
Here's a bunch of examples, showing how you can integrate this CSS module in your project, based on most popular stacks of project. You can either use a post-processed and pre-built CSS form the dist directory, ot use PostCSS sources from the src dir.
The latter have certain 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:
<style>
/* Import PostCSS source */
@import "~@coopdigital/css-foundations/src/foundations.pcss";
/* Import postprocessed distributable CSS */
@import "~@coopdigital/css-foundations/dist/foundations.css";
</style>
CSS Foundations follows a modular architecture and as such is composed out of several CSS Modules. You are free to use either individual modules or load the entire framework into your project.
necolas/normalize.css@coopdigital/foundations-vars@coopdigital/foundations-global@coopdigital/foundations-typography@coopdigital/foundations-colors@coopdigital/foundations-buttons@coopdigital/foundations-forms@coopdigital/foundations-tables@coopdigital/foundations-grid@coopdigital/foundations-layoutThis package only serves as a master package for all individual CSS modules. Development should be done within individual package repositories, following general guidelines.
Feature Foundations-global - We’ve added a padding class so logo meets minimum tap target size.
Previous releases did not have notes
Copyright (c) 2021 Co-operative Group Limited. Licensed MIT.
FAQs
Co-op CSS Foundations
We found that @coopdigital/css-foundations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.