-
-
Save Asitara/3a29d3e57f0cd7cf41a2dc6da0f00791 to your computer and use it in GitHub Desktop.
EQdkp+:: How to use the new LESS Variable "eqdkpGameClasses"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.change_attendee_box(@i:1) when(@i <= length(@eqdkpGameClasses)){ | |
@id : extract(extract(@eqdkpGameClasses, @i), 1); // read the first element -- class id | |
@name : extract(extract(@eqdkpGameClasses, @i), 2); // read the scnd element --- class name | |
@color : extract(extract(@eqdkpGameClasses, @i), 3); // read the thrd element --- class color | |
.is_color() when(iscolor(@color)){ // skip, if class color is empty | |
// start of css | |
.attendee_box.class_@{id} { | |
background: url('games/@{eqdkpGame}/classes/@{id}.png') no-repeat scroll ~"12% 0% / 25px auto" transparent; | |
border: 1px solid fade(@color, 50); | |
box-shadow: 0px 0px 6px 6px fade(@color, 30) inset; | |
} | |
// end of css | |
}.is_color(); | |
.change_attendee_box(@i+1); //next class entry | |
} | |
// start the loop | |
.change_attendee_box(); | |
// and you can easily combine with a game request, like: | |
.check_game_support() when(@eqdkpGame = 'tsw'), //game == tsw | |
(@eqdkpGame = 'wow'), // OR game == wow | |
(@eqdkpGame = 'swtor'){ // OR game == swtor | |
// game is supported -- start the loop | |
.change_attendee_box(); | |
}.check_game_support(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment