lundi 11 juin 2018

How to find class name in SCSS using if statement?

I have two different classes. one is admin and one is user.

<div class="admin"> ... </div>
<div class="user"> ... </div>

.admin{ background : red; }
.user{ background : green; }
input{ border-color : XXX;}

I want to do input border color dynamic. If parent class is admin than input border color is white and if parent class is user than input border color is black.

This is just an example, in my project two types of login and want to change so many things on using parent class.

Aucun commentaire:

Enregistrer un commentaire