Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-happo-ignore to root element #265

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Add data-happo-ignore to root element #265

merged 2 commits into from
Jan 29, 2024

Conversation

trotzig
Copy link
Contributor

@trotzig trotzig commented Jan 29, 2024

This will cause it to be excluded from the rectangle calculation when used with prerender:false.

When migrating one of my projects from prerender:true to prerender:false I noticed that there was an extra rectangle around smaller examples. Turns out the root element was causing this. In a prerender:true world, we grab the innerHTML of this root node so it isn't present in rendering on Happo workers.

This will cause it to be excluded from the rectangle calculation when
used with prerender:false.

When migrating one of my projects from prerender:true to prerender:false
I noticed that there was an extra rectangle around smaller examples.
Turns out the root element was causing this. In a prerender:true world,
we grab the innerHTML of this root node so it isn't present in rendering
on Happo workers.
And also fix the value of the attr.
@trotzig trotzig merged commit 7110421 into master Jan 29, 2024
3 checks passed
@trotzig trotzig deleted the ignore-root-node branch January 29, 2024 16:38
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.

1 participant