Naga Suresh
Naga Suresh

Reputation: 11

inherit properties of one class to another class

I have A.css and imported in B.css, There are few classes rotate45, rotate90, rotate135 and rotate180 in A.css and I would like to use them in B as

B.css
{        
    .roate{
    // Get properties of rotate180
    }

    @media(min-width:570)
    {
        .roate{
        // Get properties of rotate45
        }
    }

    @media(min-width:750)
    {
        .roate{
        // Get properties of rotate90
        }
    }

    @media(min-width:950)
    {
        .roate{
        // Get properties of rotate135
        }
    }

}

can any one help on this.

Upvotes: 1

Views: 49

Answers (1)

gkrupp
gkrupp

Reputation: 428

Import A.css into B.css.

Use @import url(); at the begining of the file.

B.css

@import url('path/to/A.css');

// code in B.css
...

Upvotes: 1

Related Questions