• Resolved kingklick

    (@kingklick)


    I am completely lost. I have always made all my changes to a theme via style.css as one would expect. However, when I went to look at and edit the style.css file for the WordPress theme “Go” and “Twenty-Twenty-Three” there is no code inside of it. I even double checked the themes’ GitHub page and verified this is how it is, I don’t have a corrupt file or anything like that. What am I missing here?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thank you for your question. New WordPress themes often come with empty style.css files because the theme developers want to give users the flexibility to customize the theme to their liking. By leaving the style.css file empty, users can add their own custom CSS to the theme, which can make it more personalized and unique to their needs.

    Additionally, it allows the theme developers to maintain and update the theme more easily, and it also makes the theme less likely to be exploited by hackers. Some themes also come with empty style.css files to encourage users to use a child theme, which can help keep the site’s design up-to-date and secure.

    Moderator Marius L. J.

    (@clorith)

    Hiya!

    The themes you use as an example here have empty style.css files, as they are Block Themes, which make use of WordPress’ Site Editor instead. This means they make use of a concept called “Global Styles” allowing the theme to put all its styles into code in a theme.json file instead, which again allows the users to make any style changes from the admin interface instead.

    You can learn more about this, and how to use it, at https://learn.www.ads-software.com/lesson-plan/how-to-style-your-site-with-global-styles/

    Thread Starter kingklick

    (@kingklick)

    @clorith thank you so much for the reply. That makes sense, but here is my question then. I am trying to edit the size of the text for my “site description” aka site tagline text, but every time I do, and I change the text size, the changes don’t stick as it seems like the theme itself overrides my changes to a default value. In the older style themes this is something that would be declared in the style.css file, but where is this code that is overriding my changes most likely located in these new Block Themes?

    UPDATE: I was able to get it to finally work by using my font plugin I’ve been using and enable the “force styles” option. Now my font size changes stick as they should. It’s weird how I never had this issue with changing font size anywhere else on my site at all, except when I went to change the font size of my site description aka tagline. Anyway, I’m just glad it worked. Thanks for all your help!

    • This reply was modified 1 year, 3 months ago by kingklick. Reason: Update: I fixed my issue
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why Do All New WordPress Themes Have Empty Style.css Files?’ is closed to new replies.