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

postcss-property-lookup

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-property-lookup

PostCSS plugin that allows referencing property values without a variable

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67K
decreased by-10.93%
Maintainers
2
Weekly downloads
 
Created
Source

postcss-property-lookup Build Status

PostCSS plugin that allows referencing property values without a variable, similar to Stylus.

.Test {
  margin-left: 20px;
  margin-right: @margin-left;
  color: red;
  background: @color url('test.png');
  line-height: 1.5;
  font-size: @(line-height)em;
}
.Test {
  margin-left: 20px;
  margin-right: 20px;
  color: red;
  background: red url('test.png');
  line-height: 1.5;
  font-size: 1.5em;
}

Check the test fixtures for more examples.

Usage

postcss([ require('postcss-property-lookup') ])

See PostCSS docs for examples for your environment.

Installation

$ yarn add postcss-property-lookup

Usage

JavaScript

postcss([
  require('postcss-property-lookup')(/* options */),
  // more plugins...
])

TypeScript

///<reference path="node_modules/postcss-property-lookup/.d.ts" />
import postcssPropertyLookup from 'postcss-property-lookup';

postcss([
  postcssPropertyLookup(/* options */),
  // more plugins...
])

Options

logLevel

Type: string: <error|warn>
Required: false
Default: warn

When a lookup cannot be resolved, this specifies whether to throw an error or log a warning. In the case of a warning, the invalid lookup value will be replaced with an empty string.

Keywords

FAQs

Package last updated on 19 May 2021

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