PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home2/medicu/.trash/cartflows.2/modules/gutenberg/src/controls/ |
| Server: Linux tista.bd.svlogins.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 IP: 103.159.37.114 |
| Dir : /home2/medicu/.trash/cartflows.2/modules/gutenberg/src/controls/maybeGetColorForVariable.js |
const maybeGetColorForVariable = ( color ) => {
// This external condition handles the following color format:
// `var(--paletteColor7)`
if ( color && color.includes( 'var' ) ) {
const style = window.getComputedStyle( document.body )
// Slice off `var(` and the slice off the `)` bracket at the end.
color = color.slice( 4 ).slice( 0, -1 );
// This nested condition handles the following color format:
// `var(--paletteColor7, #FBFBFB)`
if ( color.includes( ',' ) ) {
color = color.split( ',' ).pop().trim();
return color;
}
color = style.getPropertyValue( color ).trim();
}
return color;
}
export default maybeGetColorForVariable;