mercredi 8 mars 2017

Can I use LESS mixins with if statement plus pseudo element

Can I use LESS mixins with if statement plus pseudo element? I want to create a Mixins. The logical is if the primary color is white, then I need to give .userBadge:after secondary-color.

Here is my LESS mixins, but it seems like does not work.

    .badgeMixins(@primary-color, @secondary-color) when (@primary-color = "#fff") {
        .userBadge:after {
            background: @secondary-color;
        }
    }  

Can you please help? Thank you so much.

Aucun commentaire:

Enregistrer un commentaire