
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
@frankhoodbs/css-custom-properties-list
Advanced tools
A simple utility to fetch and list all CSS Custom Properties (often known as CSS Variables) defined in
the :root selector of stylesheets from the same domain.
:root Selector: Specifically targets custom properties defined under the :root selector.Import the utility function:
import { cssCustomPropertiesList } from '@frankhoodbs/css-custom-properties-list';
To get a list of custom properties from all stylesheets in the document:
const propertiesList = cssCustomPropertiesList(document.styleSheets);
console.log(propertiesList);
This will return an array of arrays, where each inner array contains two strings: the custom property name and its value. For example:
[
['--primary-color', '#ff4500'],
['--font-size', '16px']
]
Determines whether a given stylesheet is from the same domain as the current page.
Checks if a given rule is a style rule.
The main utility function which accepts a list of stylesheets and returns the custom properties as described above.
FAQs
Simple utility to list all the project custom properties
The npm package @frankhoodbs/css-custom-properties-list receives a total of 57 weekly downloads. As such, @frankhoodbs/css-custom-properties-list popularity was classified as not popular.
We found that @frankhoodbs/css-custom-properties-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.