Socket
Book a DemoInstallSign in
Socket

@csstools/postcss-nested-calc

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-nested-calc

Use nested calc() expressions in CSS

4.0.0
latest
Source
npmnpm
Version published
Weekly downloads
4.8M
8.88%
Maintainers
3
Weekly downloads
 
Created

What is @csstools/postcss-nested-calc?

@csstools/postcss-nested-calc is a PostCSS plugin that allows you to use nested calc() expressions in your CSS. This can simplify complex calculations and make your CSS more maintainable.

What are @csstools/postcss-nested-calc's main functionalities?

Nested calc() expressions

This feature allows you to nest calc() expressions within each other. The plugin will resolve these nested calculations into a single calc() expression.

/* Input CSS */
.example {
  width: calc(100% - calc(50px + 10px));
}

/* Output CSS */
.example {
  width: calc(100% - 60px);
}

Simplifying complex calculations

This feature simplifies complex calculations by resolving nested calc() expressions, making your CSS easier to read and maintain.

/* Input CSS */
.example {
  height: calc(100vh - calc(2 * 20px + 10px));
}

/* Output CSS */
.example {
  height: calc(100vh - 50px);
}

Other packages similar to @csstools/postcss-nested-calc

Keywords

calc

FAQs

Package last updated on 03 Aug 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.