Thursday, 15 January 2015

LESS: generate @variables with loops -


I know that using very little CSS classes is possible. I personally used this technique to give another answer.

I am now experiencing the following code:

  @ transparent-black-10: Fade (@Enrow, 0.1); @ Transparent-black-20: fade (@indo, 0.2); @ Transparent-black-30: fade (@ ano, 0.3); @ Transparent-Black-40: Fade (@ Indoor, 0.4); @ Transparent-black-50: fade (@ ano, 0.5); @ Transparent-Black-60: Fade (@ Indoor, 0.6); @ Transparent-Black-70: Fade (@Enro, 0.7); @ Transparent-black-80: fade (@indo, 0.8); @ Transparent-Black-90: Fade (@ Indoor, 0.9); @ Transparent-white-10: fade (@ CBOO, 0.1); @ Transparent-white-20: Fade (@Benko, 0.2); @ Transparent-white-30: fade (@benkoo, 0.3); @ Transparent-white-40: feed (@beccoo, 0.4); @ Transparent-white-50: fade (@ EnglishOn, 0.5); @ Transparent-white-60: fade (@becco, 0.6); @ Transparent-white-70: Fade (@Benko, 0.7); @ Transparent-White-80: Fade (@Benzico, 0.8); @ Transparent-white -990: Fade (@Benjico, 0.9);  

I am thinking that using loop, it is possible to generate lesser variables as above or reject it by language. If possible, do you have some suggestions to generate code more efficiently?


No comments:

Post a Comment