Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Selectors inheritance Reply To: Selectors inheritance

#149841
Anonymous
Inactive

Yea, I know that code you suggested will works, but then I would need to add this kind of a code to all sections. I want to just have all the styles in .button definition. Here’s the code of my button class:

    .button {
    background: $cyan;
    border-radius: $border-radius;
    color: $white;
    display: inline-block;
    font-weight: $bold;
    padding: 13px 16px;
    text-transform: uppercase;

    @include single-box-shadow($dark-cyan, 0, 3px, 0, 0);

    &:hover {
        background: $red;
        color: $white;
        @include single-box-shadow($dark-red, 0, 3px, 0, 0);
    }

}

And as I said before I set “.custom-footer a” color to red. Now I’m using my button that way:

<footer class="custom-footer"><div class="content"><a class="button">Read more</a></div></footer>

I’m wondering if there any elegant way to make .button class generic without any hacks.

Regards ;]