
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Straightforward helper functions to manipulate CSS in JS
setVar('--fav-color', 'rebeccapurple')
This package is available as a UMD, CommonJS and ES module build. This allows you to import the package as you see fit.
To get quickly get started, include the following script tag in your site's HTML file;
<script src="https://unpkg.com/css-fns"></script>
The cssFns
variable is now globally available to use.
<script>
const { getVar, setVar } = cssFns
setVar('--fav-color', 'rebeccapurple')
getVar('--fav-color')
// 'rebeccapurple'
</script>
Alternatively, you can install the package from npm, by running npm i css-fns
and import it in your project;
import setVar, { getVar } from 'css-fns'
// or
const cssFns = require('css-fns')
This package exposes the following functions to easily manipulate/access CSS custom properties;
Function name | Default export | Parameter(s) | Return |
---|---|---|---|
setVar | true | variable (str), value (str/int) | none |
getVar | false | variable (str) | property value (str) |
This project is open to and encourages contributions! Feel free to discuss any bug fixes/features in the issues. If you wish to work on this project:
git checkout -b new-feature-branch
)git commit -am 'add new feature'
)git push origin new-feature-branch
)FAQs
Straightforward helper functions to manipulate CSS in JS
We found that css-fns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.