Skip to content

ElderAS/sass-scope-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sass-scope-loader

Build Status npm npm

Sass loader to scope styles inside selector

This plugin scopes all your styles inside a configurable selector:

//Before sass-scope-loader
.input {
  //...
}

//After sass-scope-loader width options.selector ".my-plugin"
.my-plugin .input {
  //...
}

Installation

npm install --save sass-scope-loader

Usage

/* webpack.config.js */
module.exports = {
  module: {
    rules: [
      {
        test: /\.scss$/,
        use: {
          loader: 'sass-scope-loader',
          options: {
            selector: '.SCOPESELECTOR',
          },
        },
      },
    ],
  },
}

License

The MIT License Copyright (c) Carsten Jacobsen