@ulu/frontend
Version:
A versatile SCSS and JavaScript component library offering configurable, accessible components and flexible integration into any project, with SCSS modules suitable for modern JS frameworks.
13 lines (12 loc) • 439 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}`;
}