@ulu/frontend
Version:
A framework-agnostic frontend toolkit providing a modular, tree-shakable library of accessible components and utilities. Designed for seamless integration, it features a highly configurable SCSS system for any environment and vanilla JavaScript modules op
13 lines (12 loc) • 443 B
JavaScript
/**
* @module utils/css
*/
/**
* Generates a CSS custom property name with a given prefix.
* @param {string} prefix The prefix to apply to the custom property name.
* @param {string} propertyName The base name of the custom property.
* @returns {string} The fully formed CSS custom property name (e.g., "--prefix-propertyName").
*/
export function getCustomProperty(prefix, propertyName) {
return `--${ prefix }-${ propertyName }`;
}