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

postcss-simple-vars

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-simple-vars

PostCSS plugin for Sass-like variables

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
726K
decreased by-3.24%
Maintainers
1
Weekly downloads
 
Created

What is postcss-simple-vars?

The postcss-simple-vars package is a PostCSS plugin that allows you to use Sass-like variables in your CSS. It simplifies the process of managing and reusing values across your stylesheets, making your CSS more maintainable and easier to read.

What are postcss-simple-vars's main functionalities?

Variable Declaration

You can declare variables using the `$` symbol and then use these variables throughout your CSS. This makes it easy to manage and update values in one place.

/* CSS */
$primary-color: #3498db;
$padding: 10px;

.button {
  background-color: $primary-color;
  padding: $padding;
}

Variable Interpolation

You can perform operations on variables using interpolation. This allows for dynamic calculations and more flexible styling.

/* CSS */
$size: 10px;

.icon {
  width: $(size * 2);
  height: $(size * 2);
}

Default Variables

You can set default values for variables using the `!default` flag. This ensures that a variable is only assigned a value if it hasn't been defined previously.

/* CSS */
$primary-color: #3498db !default;
$primary-color: #e74c3c;

.button {
  background-color: $primary-color;
}

Other packages similar to postcss-simple-vars

Keywords

FAQs

Package last updated on 17 May 2016

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