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

less-plugin-remcalc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-plugin-remcalc

Simply adds rem-base and rem-calc functions to LESS

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

less-plugin-remcalc

OVH component

Simply adds rem-base and rem-calc functions to LESS.

NPM

Installation

yarn add --dev less-plugin-remcalc

Usage

lessc

On the command line:

lessc file.less --remcalc

node

var remcalc = require('less-plugin-remcalc');

less.render(data, { plugins: [remcalc] }).then(...);

grunt (grunt-contrib-less)

Register the plugin in your Gruntfile.js:

less: {
    options: {
        plugins: [
            require('less-plugin-remcalc')
        ]
    }
}

webpack (less-loader)

var RemcalcPlugin = require('less-plugin-remcalc');

module.exports = {
  ...
  lessLoader: {
    lessPlugins: [
      RemcalcPlugin
    ]
  }
};

Examples

Basic

.card {
  min-width: rem-calc(64px);
}

.card {
  min-width: rem-calc(64);
}

Overriding the rem base

Default base is 16px but you can override it at any time (here with 12px):

.card {
  padding: rem-calc(20px, 12px);
}

You can also act globally on the rem base, using:

@rem-base: rem-base(10px); // will globally override the rem base.

.card {
  min-width: rem-calc(20px); // is now equivalent to rem-calc(20px, 10px);
}

Keywords

FAQs

Package last updated on 06 Sep 2018

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