Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
h1のような mixin を使用して、lessでブートストラップから継承したい
h1
.btn2{ .btn; }
代わりにh1要素を使用したい:
.h1_replace{ h1; }
less がそのタイプのクラス継承をサポートしているとは思いません。代わりに、h1 スタイリングをクラスとして再定義し、それを継承する必要があります。
.h1 { /* copy h1 style here */ } .h1_replace{ .h1; }
ただし、これを行うと、おそらくコード全体で .h1 クラスを使用できます。