Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drupal-breakpoints-scss

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drupal-breakpoints-scss

Convert Drupal 8:s breakpoints (*.breakpoints.yml) to scss $variables.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
decreased by-62.34%
Maintainers
1
Weekly downloads
 
Created
Source

Drupal-breakpoints-scss

Convert Drupal 8:s breakpoints (*.breakpoints.yml) to scss $variables.

js-standard-style

Install

npm install --save drupal-breakpoints-scss

What it does

Converts this:

theme.small:
  label: breakpoint-small
  mediaQuery: 'all and (max-width: 500px)'
  weight: 1
  multipliers:
    - 1x

theme.medium:
  label: breakpoint-medium
  mediaQuery: 'all and (max-width: 700px)'
  weight: 1
  multipliers:
    - 1x

into this:

$breakpoint-small: all and (max-width: 500px);
$breakpoint-medium: all and (max-width: 700px);

// Or..

$drupal-breakpoints: (
  breakpoint-small: 'all and (max-width: 500px)',
  breakpoint-medium: 'all and (max-width: 700px)',
);

Usage

const drupalBreakpoints = require('drupal-breakpoints-scss')

drupalBreakpoints.read('./theme.breakpoints.yml', opts)
  .pipe(drupalBreakpoints.write('./scss/_breakpoints.scss'))

Options

var defaultOpts = {
  vars: true,  // Output breakpoints as vars
  map: false, // Output as a sass map
  mapName: 'drupal-breakpoints', // Name of the map
  varsPrefix: '' // Prefix vars
}

Usage with gulp

const gulp = require('gulp')
const rename = require('gulp-rename')
const drupalBreakpoints = require('drupal-breakpoints-scss')

gulp.task('task', function () {
  return gulp.src('./breakpoints.yml')
    .pipe(drupalBreakpoints.ymlToScss(opts))
    .pipe(rename('_breakpoints.scss'))
    .pipe(gulp.dest('./scss'))
})

Webpack

FAQs

Package last updated on 16 Jun 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc