WordPress.org

Ready to get started?Download WordPress

Forums

wp-layout.css (4 posts)

  1. thefreefood
    Member
    Posted 9 years ago #

    I like the new trend in 1.3 of using the wp-header, wp-footer, and wp-sidebar files to make customizing and upgrading WordPress easier. I like the trick of using, for example, header.php instead of wp-header.php if it's available, which makes upgrading almost seamless. But if that's going to be the standard for customizable PHP files, then why not take it one step further. I would like to see the same logic applied to wp-layout.css, so that I don't have to go through the task of replacing the stylesheet every time I upgrade. This would only take a simple statement in wp-header.php if I'm correct. For those of us who are upgrading to the latest nightlies regularly, this would be a significant improvement. Plus, consistent logic is always a good idea.

  2. NuclearMoose
    Member
    Posted 9 years ago #

    Another suggestion that might work is that an install have a file named wp-layout-sample.css so any existing CSS files don't get overwritten.

  3. thefreefood
    Member
    Posted 9 years ago #

    NuclearMoose: The only trouble with that option is that removing wp-layout.css from the build would mean that WordPress doesn't work as installed for the first time.
    Beel: This is true. I could do this myself I suppose. However, I still think that this would be a worthwhile feature to put in the default build, if for no other reason than consistency's sake.

  4. davidhouse
    Member
    Posted 9 years ago #

    We don't need a conditional in the CSS itself, just the file that includes it:
    if (file_exists('layout.css'))
    echo '<link rel="stylesheet" type="text/css" href="layout.css" />';
    else
    echo '<link rel="stylesheet" type="text/css" href="wp-layout.css" />';

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.