Documentation Best Practices CSS Files

CSS Files

Tips and best practices for CSS files:

  • Use wp_enqueue_style() to load stylesheets other than style.css.
  • Make sure to use relative paths for URLs in your stylesheet.
  • Avoid generating style definitions with PHP, as having a static CSS file delivered from our CDN is much faster than generating a style via a PHP script.
  • Do not change the theme name in style.css once the theme is live, as it will break the loading of Page Templates.

Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.