I have 2 classes class A and Class B in CSS..I need to create a 3 class named Class C and add some styles in that in addition to the styles of class A and Class B.Is it possible to inherit Class A and B in C?
It's not possible to inherit classes without dynamically generating your CSS file.
However, you can add your additional style attributes to ClassC and use the following in your HTML:
<div class="ClassA ClassB ClassC">
Inheritance is not possible with standard CSS. You could use a tool like less to achieve inheritance though.
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