From 12efe781e451ccd9222967edda38afb6fc3c5aa8 Mon Sep 17 00:00:00 2001 From: Roman Pavlov Date: Tue, 12 Aug 2025 14:19:13 +0400 Subject: [PATCH 1/2] fix-variables-processing --- .../react-strict-dom/src/native/css/processStyle.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/react-strict-dom/src/native/css/processStyle.js b/packages/react-strict-dom/src/native/css/processStyle.js index be45fe2a..b9642174 100644 --- a/packages/react-strict-dom/src/native/css/processStyle.js +++ b/packages/react-strict-dom/src/native/css/processStyle.js @@ -110,15 +110,14 @@ export function processStyle( result[propName] = 0; continue; } - // Polyfill support for string opacity on Android - if (propName === 'opacity') { - result[propName] = parseFloat(styleValue); - continue; - } - // Polyfill support for custom property references (do this first) - else if (stringContainsVariables(styleValue)) { + if (stringContainsVariables(styleValue)) { + // Polyfill support for custom property references (do this first) result[propName] = CSSUnparsedValue.parse(propName, styleValue); continue; + } else if (propName === 'opacity') { + // Polyfill support for string opacity on Android + result[propName] = parseFloat(styleValue); + continue; } else if ( propName === 'caretColor' && (typeof styleValue === 'undefined' || styleValue === 'auto') From e2c69fbe218d84577577e9913123635d8c8bf997 Mon Sep 17 00:00:00 2001 From: Roman Pavlov Date: Tue, 12 Aug 2025 20:12:17 +0400 Subject: [PATCH 2/2] restore comments format --- packages/react-strict-dom/src/native/css/processStyle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-strict-dom/src/native/css/processStyle.js b/packages/react-strict-dom/src/native/css/processStyle.js index b9642174..41211e9e 100644 --- a/packages/react-strict-dom/src/native/css/processStyle.js +++ b/packages/react-strict-dom/src/native/css/processStyle.js @@ -110,12 +110,12 @@ export function processStyle( result[propName] = 0; continue; } + // Polyfill support for custom property references (do this first) if (stringContainsVariables(styleValue)) { - // Polyfill support for custom property references (do this first) result[propName] = CSSUnparsedValue.parse(propName, styleValue); continue; + // Polyfill support for string opacity on Android } else if (propName === 'opacity') { - // Polyfill support for string opacity on Android result[propName] = parseFloat(styleValue); continue; } else if (