- This topic has 3 replies, 3 voices, and was last updated 1 month, 1 week ago by Tom.
August 19, 2020 at 3:24 pm #1410209michael
-I have the latest WP version 5.5, GP version 2.4.2 & GP-Premium version 1.11.3, Simple CSS version: 1.1.1
-I am using a child theme of SiteLibrary-Mellow.
-I am using Code Editor: Visual Studio Code
NOTE: I understand that I can have ONLY 1 style.css file & that it must only contain a Commented Header: (my file contains the following)
Theme Name: cUcMe GenPress-Mellow-Child
Theme URI: https://generatepress.com
Description: Default GeneratePress child theme, from SiteLibrary-MellowTheme
QUESTION: Is this above assumption correct, or does GP allow me to use multiple css files ??? My current SimpleCSS number of lines is almost 6000lines & growing !!!
It would be GREAT to have a CSS file per page of my site, for example.
I have created a “simple-css.css” file in my Visual Studio Code working site directory. I first edit this file, then Copy & Paste replacing what is in GP-SimpleCSS.
This works fine, but is there a BETTER WAY… what are Best Practices ????
Thanks.August 20, 2020 at 4:00 am #1410736DavidStaffCustomer Support
WP allows you to add as many empty style sheets as you want. The most efficient method is using
They can even be conditionally loaded if you so wish.
However, i would only really consider splitting styles if i had 1000’s of lines that were specific to a small number of pages that wasn’t required on the majority of the site.
Personally i would put it all in the child theme stylesheet. Now its in a file, the browser will cache it, so it only loads the once.August 20, 2020 at 10:31 am #1411546michael
So I want to understand your advice clearly.
Are you saying that its OK for me to Deactivate the SimpleCSS plugin & copy all my CSS into my currently empty but commented Child style.css ???
I thought I read somewhere in your documentation, that when you have a “child” theme (as I do) created from your Site-Library theme, that the style.css must be empty & commented, & that you should use the SimpleCSS plugin???? Is this true???
ThanksAugust 20, 2020 at 2:58 pm #1411843TomLead DeveloperLead Developer
Not at all, you can absolutely use a child theme
style.cssinstead of using a plugin like Simple CSS.
What you shouldn’t do is alter the parent theme stylesheet, so just make sure you’re using a child theme 🙂
- You must be logged in to reply to this topic.