From 12f8940531a7427847aaefdc39b5decac55fce51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Mon, 6 Jul 2026 14:21:11 +0200 Subject: [PATCH 1/5] feat(WW-3544): Export text surface CSS variables - move text surface bridge variables to component CSS config - support formula-safe mapped CSS values --- ww-config.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ww-config.js b/ww-config.js index 7f14170..26af397 100644 --- a/ww-config.js +++ b/ww-config.js @@ -1,5 +1,42 @@ +function getTextSurfaceCss(content) { + const css = []; + + if (content.backgroundColor) { + css.push({ property: '--ww-text-background-color', value: content.backgroundColor }); + } + + css.push( + { + property: '--ww-text-white-space', + value: content._mapValue('_ww-text_nowrap', 'white-space', { + trueValue: 'nowrap', + falseValue: 'initial', + }), + }, + { + property: '--ww-text-overflow', + value: content._mapValue('_ww-text_nowrap', 'overflow', { + trueValue: 'hidden', + falseValue: 'initial', + }), + }, + { + property: '--ww-text-text-overflow', + value: content._mapValue('_ww-text_ellipsis', 'text-overflow', { + trueValue: 'ellipsis', + falseValue: 'initial', + }), + } + ); + + return css; +} + export default { inherit: ['ww-text'], + css({ content }) { + return getTextSurfaceCss(content); + }, editor: { label: { en: 'Text', From 077a9f4106106785bcd0c252af5e09d47614e858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Tue, 7 Jul 2026 17:15:40 +0200 Subject: [PATCH 2/5] feat(WW-3544): Export text CSS variables --- ww-config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ww-config.js b/ww-config.js index 26af397..1326481 100644 --- a/ww-config.js +++ b/ww-config.js @@ -1,4 +1,4 @@ -function getTextSurfaceCss(content) { +function getTextSurfaceCss(content, style) { const css = []; if (content.backgroundColor) { @@ -26,6 +26,10 @@ function getTextSurfaceCss(content) { trueValue: 'ellipsis', falseValue: 'initial', }), + }, + { + property: '--ww-element-transition', + value: style.transition, } ); @@ -34,8 +38,8 @@ function getTextSurfaceCss(content) { export default { inherit: ['ww-text'], - css({ content }) { - return getTextSurfaceCss(content); + css({ content, style }) { + return getTextSurfaceCss(content, style); }, editor: { label: { From 66ea8ef22c50cc8fe1c44b9d31374c754a213915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Wed, 5 Aug 2026 23:28:01 +0200 Subject: [PATCH 3/5] fix(WW-3544): Preserve legacy text background behavior --- ww-config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ww-config.js b/ww-config.js index 1326481..eaee72a 100644 --- a/ww-config.js +++ b/ww-config.js @@ -1,10 +1,6 @@ function getTextSurfaceCss(content, style) { const css = []; - if (content.backgroundColor) { - css.push({ property: '--ww-text-background-color', value: content.backgroundColor }); - } - css.push( { property: '--ww-text-white-space', From dd1423edcf20083f4c4a178f19bad80ceec1f29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Wed, 5 Aug 2026 23:42:44 +0200 Subject: [PATCH 4/5] chore(WW-3544): Document text background compatibility --- ww-config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ww-config.js b/ww-config.js index eaee72a..a3b867a 100644 --- a/ww-config.js +++ b/ww-config.js @@ -1,6 +1,10 @@ function getTextSurfaceCss(content, style) { const css = []; + // TODO(WW-3544): Reintroduce Text Background only with an explicit compatibility plan. + // The legacy inline engine ignored content.backgroundColor. Exporting it here applies the + // value to every component inheriting ww-text, notably making some existing button labels + // unreadable when their text color and legacy text background contain the same color. css.push( { property: '--ww-text-white-space', From 932c799cb85e5c35d75f647ec0708c66cbc43f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Thu, 6 Aug 2026 10:21:56 +0200 Subject: [PATCH 5/5] chore(WW-3544): Remove text background compatibility comment --- ww-config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ww-config.js b/ww-config.js index a3b867a..eaee72a 100644 --- a/ww-config.js +++ b/ww-config.js @@ -1,10 +1,6 @@ function getTextSurfaceCss(content, style) { const css = []; - // TODO(WW-3544): Reintroduce Text Background only with an explicit compatibility plan. - // The legacy inline engine ignored content.backgroundColor. Exporting it here applies the - // value to every component inheriting ww-text, notably making some existing button labels - // unreadable when their text color and legacy text background contain the same color. css.push( { property: '--ww-text-white-space',