mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
13 lines
441 B
TypeScript
13 lines
441 B
TypeScript
// Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
/**
|
|
* Get the value of a Tailwind CSS variable from :root
|
|
* @param variableName - The name of the CSS variable (e.g., '--color-green-400')
|
|
* @returns The value of the CSS variable
|
|
*/
|
|
|
|
export const getTailwindStyleValue = (variableName: string) => {
|
|
const styles = getComputedStyle(document.documentElement)
|
|
|
|
return styles.getPropertyValue(variableName)
|
|
}
|