WordPress.org

Forums

[resolved] CSS of Blank Theme Does NOT Show My Edits - Why ? (5 posts)

  1. leahko
    Member
    Posted 1 year ago #

    On WordPress.org, I activated a BLANK theme by Chris Coyier.
    I edit index.php and my changes are showing up on my website. Fantastic.

    I edit the existing style.css file but none of my edits are showing up. Ugh.
    I delete style.css and the website still works. Why?
    I repeat these steps with a different blank theme. Same issues.

    Questions

    1. Why am I unable to edit style.css of ANY blank theme? I am confused because I am able to edit style.css of Twentyfourteen theme.

    2. If I delete style.css from the blank theme, the website still works and still shows the same CSS styling. How is this possible?

    3. For blank themes, the stylesheet is called in header.php as
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
    But for Twentyfourteen theme, I don't see any call for a stylesheet.

    Why do regular themes not have a call for a stylesheet in header.php? Is this why I cannot edit style.css of blank themes?

  2. Andrew
    Forum moderator
    Posted 1 year ago #

    You really should link the website with the issue.

    Why do regular themes not have a call for a stylesheet in header.php?

    They do, check out your functions.php file.

    Is this why I cannot edit style.css of blank themes?

    Is it worth answering this? You wouldn't have that question if you set up a Child Theme.

  3. leahko
    Member
    Posted 1 year ago #

    No link to website because I am working locally.

    I asked this question despite setting up a child theme - yes a child theme indeed works and displays my CSS, but I don't understand why you would need a child theme for a BLANK theme - Can you explain?

    I'd like to understand why I am able to edit CSS (without a child theme) of the Twentyfourteen theme, but NOT a blank theme.

  4. CrouchingBruin
    Member
    Posted 1 year ago #

    Just for kicks, I installed Chris Coyier's BLANK theme, and I changed the H1 tag to a font-size of 30px. I got a change in my site title right away. What or how did you try to edit the style sheet? Did you inspect the element that you were trying to change using a web debugging tool like Firebug or Chrome Developer Tools?

    Your site will still work even if you delete the style.css file because each browser has a local style sheet that's used if there is no external CSS defined for a particular element. If you were to inspect, for example, the site title using one of the aforementioned web debugging tools, you'd see that the style comes from the "user agent stylesheet," which means the browser's own local stylesheet.

    In general, it is always better to create a child theme and make changes to it instead of to the theme files directly. If the theme ever gets updated because of feature enhancements (which is probably unlikely for the blank theme), security patches (possible), or bug fixes, then your changes will be lost.

  5. leahko
    Member
    Posted 1 year ago #

    Resolved.

    CTRL+F5

    to clear the browser cache.

Topic Closed

This topic has been closed to new replies.

About this Topic