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

Avoid early style removal by GitHub on ajax navigation #6787

Merged
merged 5 commits into from
Jul 24, 2023
Merged

Conversation

fregante
Copy link
Member

@fregante fregante commented Jul 22, 2023

Before Turbo unloads a page, it will reset the HTML and BODY classes, removing our classes too. This often causes FOUC because the page is still visible; hide-navigation-hover-highlight on the notifications or clean-rich-text-editor are the most visible.

Features that don't use these classes for CSS rules don't have to use attributes (e.g. a feature that adds a class to body only for delegate or observe)

Before

Screenshot 6

After

Screenshot 7

@fregante fregante added the bug label Jul 22, 2023
@fregante fregante changed the title Avoid early style removal by GitHub Avoid early style removal by GitHub on ajax navigation Jul 24, 2023
@fregante fregante merged commit 5598d08 into main Jul 24, 2023
11 checks passed
@fregante fregante deleted the attributes branch July 24, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant