WordPress.org

Ready to get started?Download WordPress

Forums

Kubrick Theme: CSS Repeated and Inconsistent (4 posts)

  1. spidermitch
    Member
    Posted 6 years ago #

    Howdy,

    I'm not a CSS guru, but I'm certainly no stranger to it either. I just started creating a custom theme basing it off the Kubrick theme as recommended by the WP codex. Then I saw a few things that bothered me. I've searched and not found anything that can help or answer my questions.

    The issue: css selectors repeated in the stylesheet. Most specifically, #page, #header, and #headerimg. Here are the excerpts from the stylesheet:

    /* Begin Typography & Colors */ ...
    #page {
    background-color: white;
    border: 1px solid #959596;
    text-align: left;
    }

    #header {
    background: #73a0c5 url('images/kubrickheader.jpg') no-repeat bottom center;
    }

    #headerimg {
    margin: 7px 9px 0;
    height: 192px;
    width: 740px;
    }

    /* Begin Structure */
    #page {
    background-color: white;
    margin: 20px auto;
    padding: 0;
    width: 760px;
    border: 1px solid #959596;
    }

    #header {
    background-color: #73a0c5;
    margin: 0 0 0 1px;
    padding: 0;
    height: 200px;
    width: 758px;
    }

    #headerimg {
    margin: 0;
    height: 200px;
    width: 100%;
    }

    I am under the assumption (correct me if I'm wrong) that the last value defined for any selector property is the one that sticks. In the above code, for example, the height property for #headerimg will be set to 200px, and the first definition of 192px will be ignored.

    In other instances, the information is merely repeated, which for any DRY programmers is wasted code. For example,
    #page background and border are set to the same thing twice.

    I'm frustrated for a few reasons. First, am I missing something? Is there a reason the author did this? I don't want to go in and delete lines if there is something I'm not seeing. Second, is this not a good code base to start with for a custom theme? I'd like to think that with its age, Kubrick should be nearly perfect. Now I'm wondering.

    So, if anyone can tell me I'm insane, or point me to some article that explains why the inconsistencies are there, I'd appreciate it. I visited this once a year ago and never really got an answer. I just want a solid foundation that I can feel confident in as I start tweaking. I don't like settling for "it seems to work".

  2. Meyithi
    Member
    Posted 6 years ago #

    That's just the way the Kubrick CSS is laid out, elements are declared in duplicate within sections.

    It's not the big deal you make it out to be, if you want to tidy it up, tidy it up.

  3. Root
    Member
    Posted 6 years ago #

    If you want a solid foundation then do not use Kubrick at all.

  4. mellojoe
    Member
    Posted 6 years ago #

    It was recommended to me to find a "custom theme" and start from there.

    Once I swtiched away from the "kubrick" theme, my coding days got a lot easier.

Topic Closed

This topic has been closed to new replies.

About this Topic