Tagged: child theme, custom.css
-
AuthorPosts
-
February 11, 2020 at 3:16 pm #1183531
I always use a Child theme and put my custom css in the Quick CSS field in the Enfold settings tabs.
However, now I have read that it’s adviced to place custom css in the Child theme style.css file when you have a lot of custom css.
But what is considered a lot of custom css? I have for example 150 lines of custom css code, and put it in the Quick css field, not in the style.css from the Child theme.
What are the advantages of putting the code in Child theme style.css? Does it improve pagespeed?
In other words: what’s best practice here?
February 11, 2020 at 5:15 pm #1183602Hey Alwin,
There are multiple was to add css. Refer to the following:
Only advantages of one over the other is just from a ease of management stand-point.
Best regards,
Jordan ShannonJune 16, 2020 at 12:22 pm #1222979Does it make any difference if I add my custom CSS code in the Quick CSS field in the Enfold settings tabs, or in the style.css file located in my Child Theme folder:
– for the speed (load time) of the website?
– to avoid the risc of losing custom css code with a Enfold theme update?Thank you :)
June 16, 2020 at 12:41 pm #1222992Hi,
In both cases, you will not lose your custom CSS as update overwrites parent theme only and your CSS in Quick CSS is in stored inside uploads folder and style.css file is on your child theme remains intact.
You may need to add !important rule to selectors when using your custom CSS in Style.css file. Other than that, it is really up to you to which field to use :)
Regards,
YigitJune 16, 2020 at 12:48 pm #1222994Hello Yigit,
So basically you are saying to adding the custom css in the Quick CSS field avoid the need to add !important rules to the custom css code, so it’s the most easiest method of adding custom css.
I also have the WordPress file editor disabled (for security reasons) so using the Quick CSS field is much more easy for me because of that too :)
Thanks for your advice!
June 16, 2020 at 1:07 pm #1223004 -
AuthorPosts
- The topic ‘where to place custom css’ is closed to new replies.