Skip to content

Commit

Permalink
docs: document what postcss plugins do
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Feb 1, 2021
1 parent f19ff1d commit 1cf5369
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/mc-scripts/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,54 @@ module.exports = {
parser: false,
map: false,
plugins: [
/**
* Plugin to transform `@import` rules by inlining content.
* https://github.com/postcss/postcss-import
*/
require('postcss-import')(),
/**
* Plugin to parse CSS and add vendor prefixes to CSS rules
* using values from "[Can I Use](https://caniuse.com/)".
* https://github.com/postcss/autoprefixer
*/
require('autoprefixer')({
// Enables `-ms-` prefixes for Grid Layout including some
// limited autoplacement support.
// https://github.com/postcss/autoprefixer#grid-autoplacement-support-in-ie
grid: 'autoplace',
overrideBrowserslist: browserslist.development,
}),
/**
* Plugin to enable Custom Media Queries in CSS, following
* the [CSS Media Queries](https://drafts.csswg.org/mediaqueries-5/#custom-mq) specification.
* https://github.com/postcss/postcss-custom-media
*/
require('postcss-custom-media')({
importFrom: safeResolvePath(
'@commercetools-frontend/application-components',
'materials/media-queries.css'
),
}),
/**
* Plugin to enable Custom Properties in CSS, following
* the [CSS Custom Properties](https://www.w3.org/TR/css-variables-1/) specification.
* https://github.com/postcss/postcss-custom-properties
*/
require('postcss-custom-properties')({
preserve: false,
importFrom: safeResolvePath(
'@commercetools-uikit/design-system',
'materials/custom-properties.css'
),
}),
// TODO: we should deprecate/remove this, as it's not maintained and it doesn't
// officially support postcss v8 yet.
require('postcss-color-mod-function')(),
/**
* Plugin to `console.log()` the messages (warnings, etc.)
* registered by other PostCSS plugins.
* https://github.com/postcss/postcss-reporter
*/
require('postcss-reporter')(),
],
};

0 comments on commit 1cf5369

Please sign in to comment.