From 87c2b4ddae6f739043f935e1c444dec5aa85a06d Mon Sep 17 00:00:00 2001 From: Pranav Zinzurde Date: Thu, 20 Aug 2026 17:39:17 +0530 Subject: [PATCH 1/3] fix(dom): stop duplicating authored ', { withShadow: false }); + + let liveStyle = document.getElementById('var-shorthand'); + let liveText = liveStyle.textContent; + + let $ = parseDOM(serializeDOM(), 'plain'); + let clonedStyle = $('#var-shorthand')[0]; + + expect(clonedStyle.innerHTML).toBe(liveText); + expect(clonedStyle.getAttribute('data-percy-cssom-serialized')).toBeNull(); + }); }); }); From 9b813431b969d727f391ac7cccc1a4608e39e989 Mon Sep 17 00:00:00 2001 From: Pranav Zinzurde Date: Mon, 24 Aug 2026 02:33:52 +0530 Subject: [PATCH 2/3] refactor(dom): keep the PER-10567 rationale in the PR description, not the code Drops the explanatory comment blocks added with the fix so clone-dom.js and the tests carry only the behavioural change. Co-Authored-By: Claude Opus 5 (1M context) --- packages/dom/src/clone-dom.js | 6 ------ packages/dom/test/serialize-css.test.js | 26 +++---------------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/packages/dom/src/clone-dom.js b/packages/dom/src/clone-dom.js index e267bf518..2f7c8b491 100644 --- a/packages/dom/src/clone-dom.js +++ b/packages/dom/src/clone-dom.js @@ -80,12 +80,6 @@ export function cloneNodeAndShadow(ctx) { // Handle ', { withShadow: false }); let liveStyle = document.getElementById('var-shorthand'); From df9b61e2457f26bdf0a791a422a2493ba5608044 Mon Sep 17 00:00:00 2001 From: Pranav Zinzurde Date: Mon, 24 Aug 2026 02:53:28 +0530 Subject: [PATCH 3/3] docs(dom): drop stale clone-dom duplication references from styleSheetsMatch The lenA > lenB tolerance and its regression test described clone-dom's