How to inherit an element in less similar class clustering?

we want to inherit h1less from bootstraps using mixin like

.btn2{ .btn; }

but instead want to use an element h1:

.h1_replace{ h1; }
+5
source share
2 answers

I do not believe that this type of class inheritance is less supported. Instead, you may have to redefine the h1 style as a class and inherit it.

.h1 {
    /* copy h1 style here */
}

.h1_replace{ 
    .h1;
}

Although, if you do, you can probably just use the .h1 class in all of your code.

+2
source

You can use the extension:

.h1_replace:extend(h1) {}

http://lesscss.org/features/#extend-feature

+2
source

All Articles