Title: Inline CSS &amp; Google Fonts
Last modified: April 30, 2018

---

# Inline CSS & Google Fonts

 *  [Scott Hartley](https://wordpress.org/support/users/destac/)
 * (@destac)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/inline-css-google-fonts/)
 * I noticed that when you’re using a particularly button heavy page the CSS is 
   all inlined which is fine but this generates quite a few issues from a performance
   perspective and while I could aggregate all the CSS into a file, there are over
   20 buttons and the google font’s are loaded via [@import](https://wordpress.org/support/users/import/).
 * This raises a couple of performance issues with this primarily, the following.
 * 1. Because the google fonts are loaded via [@import](https://wordpress.org/support/users/import/)
   they can’t be aggregated whether it is via a plugin like Autoptimize, WPRocket,
   or Google WebFont Optimizer. So on a page where there are 9 different buttons,
   this can really begin to hinder performance as all the files are loaded with 
   [@import](https://wordpress.org/support/users/import/).
 * 2. Additionally, because the CSS is inlined it can’t be cached unless the users
   take all the CSS and load it into its own file.
 * Suggestions.
 * Would it be possible in the future for the CSS files that are selected for the
   buttons be enqueued like a normal font file would be, & if possible could the
   inline CSS be run through a compiler so it is aggregated into a single file.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/inline-css-google-fonts/#post-10233084)
 * Hi,
 * Thanks for the feedback, I appreciate it. There is already an item on the list
   to include more checks and reduce the font loading, if possible.
 * – The free version shouldn’t have all this loading, since it doesn’t offer any
   google fonts
 * – MaxButtons doesn’t put any styles inline by default, but cached, minimized 
   and the bottom of the page ( already from the plugin) . So it’s already close
   to max. optimized.
 * – Using > 9 fonts on a website and loading them via google is in any case problematic,
   because of the loading time indeed. I would recommmend using less of them.
 * I like your seperate file suggestion though and will put that on the list to 
   happen at some point.

Viewing 1 replies (of 1 total)

The topic ‘Inline CSS & Google Fonts’ is closed to new replies.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/inline-css-google-fonts/#post-10233084)
 * Status: not resolved