@skilld/postcss-drupal-breakpoints

0.0.1 • Public • Published

PostCSS Drupal Breakpoints Build Status

PostCSS plugin to get drupal theme breakpoints in css variables.

Input

css

@drupal-breakpoint wide_1x {
  .pager {
    display: none;
  }
}

THEMENAME.breakpoints.yml

THEMENAME.mobile:
  label: mobile
  mediaQuery: '(min-width: 0em)'
  weight: 0
  multipliers:
    - 1x
THEMENAME.wide:
  label: wide
  mediaQuery: 'screen and (min-width: 40em)'
  weight: 1
  multipliers:
    - 1x

postcss.config.js

module.exports = ctx => ({
  plugins: [
    require('postcss-drupal-breakpoints')({
      importFrom: './THEMENAME.breakpoints.yml',
      themeName: 'THEMENAME'
    }),
  ]
});

Output

@media screen and (min-width: 40em) {
  .pager {
    display: none;
  }
}

Package Sidebar

Install

npm i @skilld/postcss-drupal-breakpoints

Weekly Downloads

34

Version

0.0.1

License

MIT

Unpacked Size

6.14 kB

Total Files

5

Last publish

Collaborators

  • hog_seruj
  • koskinpark
  • maahes
  • finnsky
  • nguerrier