News for hackers. Stuff that matters.
Re:How We Could Write Better CSS by Sakes on Tuesday September 24, 2013 @03:07PM (#6440028)
Just nit picking here, but I think your selectors are a bit redundant and long. What do you think about something like this?

    .home-header-h1{
        font-size: 20pt;
        padding: 0px;
        margin: 0px;
        line-height: 1.3;
    }
    h1.home-blue{
        @extend .home-header-h1;
        color: blue;
    }
    h1.home-green{
        @extend .home-header-h1;
        color: green;
    }
But I think if I was trying to truly minimize maintenance I would do something like... (in LESS not familiar with sass)

    h1.home {
        font-size: 20pt;
        padding: 0px;
        margin: 0px;
        line-height: 1.3;

        &.blue {
            color: blue;
        }

        &.green {
            color: green;
        }
    }

There are no comments on this comment yet.