I want my custom class pm_btn
to get all the properties that bootstrap's btn
class has. One way is to use the actual source code of the btn
class. But I believe that there has to be a better way. Therefore, I tried a bit of scss
, where inheriting properties is quite easy and trivial using @extend
as follows:
.pm_btn{
@extends .btn;
}
But this throws error :
Error: The target selector was not found.
Use "@extend .btn !optional" to avoid this error.
I am trying to achieve: apply bootstrap like classes to django-postman
classes.
Please suggest me how can I achieve this, if I am on the right track by choosing SCSS
or should I think in some other directions. Thank you for your valuable time.
question from:
https://stackoverflow.com/questions/65847522/inherit-bootstrap-properties-to-a-custom-class 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…