Skip to content

Fix mobile styling lost after DOMParser linting change#1

Merged
AutonomousWork merged 1 commit intomasterfrom
claude/fix-mobile-styling-FV6SE
Feb 28, 2026
Merged

Fix mobile styling lost after DOMParser linting change#1
AutonomousWork merged 1 commit intomasterfrom
claude/fix-mobile-styling-FV6SE

Conversation

@AutonomousWork
Copy link
Copy Markdown
Owner

The previous commit switched from innerHTML to DOMParser for linting
compliance, but DOMParser places <style> elements in parsed.head rather
than parsed.body. Since only body children were being moved into the
shadow DOM wrapper, all inline <style> tags from the HTML content were
silently dropped, breaking page styling on mobile.

Fix by also moving <style> elements from parsed.head into the wrapper
before appending body children.

https://claude.ai/code/session_011u6RnbyEkT46eMEANi6FaC

The previous commit switched from innerHTML to DOMParser for linting
compliance, but DOMParser places <style> elements in parsed.head rather
than parsed.body. Since only body children were being moved into the
shadow DOM wrapper, all inline <style> tags from the HTML content were
silently dropped, breaking page styling on mobile.

Fix by also moving <style> elements from parsed.head into the wrapper
before appending body children.

https://claude.ai/code/session_011u6RnbyEkT46eMEANi6FaC
@AutonomousWork AutonomousWork merged commit 5b6acb1 into master Feb 28, 2026
4 checks passed
@AutonomousWork AutonomousWork deleted the claude/fix-mobile-styling-FV6SE branch February 28, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants