Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

🎨 Support CSS in client-side navigations #85

Merged

Conversation

luisherranz
Copy link
Member

@luisherranz luisherranz commented Oct 19, 2022

I've added support for loading the CSS of the head during the client-side navigations.

I finally opted for not using vDOM diffing, and I also opted for using a <style> for <link rel="stylesheet"> to make sure we do the navigation (body and CSS) in a single step and avoid any FOUC. I think it's simpler this way, but happy to hear other opinions.

https://www.loom.com/share/827311414ffd4acdacb2b675b09050fa

@DAreRodz: please check that this solves your problems with CSS during the navigations.

Copy link
Collaborator

@DAreRodz DAreRodz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great. Simple and effective. 💯

@luisherranz
Copy link
Member Author

Thanks, David.

@luisherranz luisherranz merged commit f947cac into main-wp-directives-plugin Oct 19, 2022
@luisherranz luisherranz deleted the support-css-in-client-side-transitions branch October 19, 2022 12:17
@luisherranz luisherranz changed the title 🎨 Support CSS in client-side transitions 🎨 Support CSS in client-side navigations Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants