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

@csstools/postcss-stepped-value-functions

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-stepped-value-functions

Use round, rem and mod functions in CSS

  • 3.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7M
increased by1.51%
Maintainers
3
Weekly downloads
 
Created

What is @csstools/postcss-stepped-value-functions?

@csstools/postcss-stepped-value-functions is a PostCSS plugin that provides stepped value functions for CSS. It allows you to define values that change in steps, which can be useful for creating responsive designs or animations that need to change at specific intervals.

What are @csstools/postcss-stepped-value-functions's main functionalities?

step-start

The `step-start` function allows you to define a value that changes in steps starting from the initial value. In this example, the width of the element changes in three steps from 100px to 200px.

/* Input CSS */
.element {
  width: step-start(100px, 200px, 3);
}

/* Output CSS */
.element {
  width: 100px;
}
.element:nth-child(2) {
  width: 150px;
}
.element:nth-child(3) {
  width: 200px;
}

step-end

The `step-end` function allows you to define a value that changes in steps ending at the final value. In this example, the height of the element changes in four steps from 50px to 150px.

/* Input CSS */
.element {
  height: step-end(50px, 150px, 4);
}

/* Output CSS */
.element {
  height: 50px;
}
.element:nth-child(2) {
  height: 83.33px;
}
.element:nth-child(3) {
  height: 116.67px;
}
.element:nth-child(4) {
  height: 150px;
}

Other packages similar to @csstools/postcss-stepped-value-functions

Keywords

FAQs

Package last updated on 19 Feb 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

  • 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