From 0c52b4909829a41b9f91472ca73d32df80570ac9 Mon Sep 17 00:00:00 2001 From: Shivanshu07 Date: Thu, 15 Oct 2026 16:46:46 +0530 Subject: [PATCH 1/2] fix(dom): drop comment nodes inside ` with empty marker comments + // around the binding; serialized as `` they make `display: flex` drop. + withExample('
', { withShadow: false }); + + let liveStyle = document.getElementById('lit-markers'); + liveStyle.append( + '.grid {\n', + document.createComment(''), + ' display: flex; gap: 16px; }', + document.createComment('') + ); + expect(getComputedStyle(document.querySelector('.grid')).display).toBe('flex'); + + let $ = parseDOM(serializeDOM(), 'plain'); + let clonedStyle = $('#lit-markers')[0]; + + expect(clonedStyle.innerHTML).not.toContain('