Home › Forums › Gutenberg › CSS performance › Reply To: CSS performance
This is not specific to blocks or classic editor. For performance the best choice is to include local inline CSS for small chunks of CSS code that may or may not be needed when the page is generated.
I realize this is counter-intuitive for most of us old school developers and it took me a while to accept as well.
Multiple small CSS files == bad for performance
Large CSS with styles that are not used == bad for performance
Inline CSS == better for performance.
So in the same file where you are generating the HTML you just add <style> ..... </style>
. Even better if you do so in a way that only includes this once per page if the same code is called more than once.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.