we want to inherit from bootstraps h1
in less using a mixin like
.btn2{ .btn; }
but instead want to use the h1
element:
.h1_replace{ h1; }
I do not believe that less supports that type of class inheritance. Instead you would likely have to redefine the h1 styling as a class and inherit that.
.h1 {
/* copy h1 style here */
}
.h1_replace{
.h1;
}
Though if you do this, you probably could just use the .h1 class throughout your code.
You could use an extend:
.h1_replace:extend(h1) {}
http://lesscss.org/features/#extend-feature
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With