Just like in programming languages! Is it possible to do something similar as shown below in CSS?
<style type="text/css">
.classA { properties 1,2,3... }
.classB { properties a, b, c... }
.classAB { inherit- classA, classB }
</style>
when using Bootstrap, I often have to use lots of div‘s which confuse me and even mess up my code. So, I decided know whether is there any feature as shown above..
Now when I apply, <p class="classAB"></p>, it should inherit classA and classB features!
No, not in ‘vanilla’ CSS.
Use LESS or SASS, which have this functionality (and much more) and compile to CSS. See http://sass-lang.com/ or http://lesscss.org/
And of course, you could use
which is not really inheritance but might do what you want.