New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-less

Package Overview
Dependencies
Maintainers
2
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-less

Stub description for gatsby-plugin-less

  • 2.0.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.3K
decreased by-3.95%
Maintainers
2
Weekly downloads
 
Created
Source

gatsby-plugin-less

Provides drop-in support for Less stylesheets

Install

yarn add gatsby-plugin-less

How to use

  1. Include the plugin in your gatsby-config.js file.
  2. Write your stylesheets in Less and require or import them as normal.
// in gatsby-config.js
plugins: [
  `gatsby-plugin-less`
]

If you need to pass options to Less use the plugins options; see less-loader for all available options.

// in gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-less`,
    options: {
      strictMath: true,
    }
  }
]

With CSS Modules

Using CSS modules requires no additional configuration. Simply prepend .module to the extension. For example: App.less -> App.module.less. Any file with the module extension will use CSS modules.

PostCSS plugins

PostCSS is also included to handle some default optimizations like autoprefixing a and common cross-browser flexbox bugs. Normally you don't need to think about it, but if you'd prefer to add additional postprocessing to your Less output you can sepecify plugins in the plugin options

// in gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-less`,
    options: {
      postCssPlugins: [
        somePostCssPlugin()
      ]
    }
  }
]

Keywords

FAQs

Package last updated on 03 Sep 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