New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-computed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-computed - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "postcss-computed",
"version": "1.0.1",
"version": "1.0.2",
"description": "A postcss plugin helps to write and call JavaScript functions in css for computed values.",

@@ -5,0 +5,0 @@ "main": "index.js",

# postcss-computed
A postcss plugin helps to write and call JavaScript functions in css for computed values.
## How to use?
### 1. Define you function in css like this.
````css
@func verticalPercent(num_h) {
@stmt var full_h = 1336;
@stmt if (num_h <= 0) {
@stmt return 0;
}
@stmt return (num_h / full_h * 100).toFixed(5) + "%";
}
````
`@func` show be placed before the function name and `@stmt` before each javascript statement. That's it!
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