Last active
February 3, 2016 14:01
-
-
Save rezoner/d01d0adcc2f2a7f4caf4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
What I would like to have is a way to build an element out of components. | |
Components can duplicate and order can be easily set. | |
*/ | |
".content button": [ | |
["image", "button.png", 0, 0], | |
["sprite", "flames", "center", "center"], | |
["text", "HEAVY LASER", "center", "top"], | |
["text", "80 credits", "center", "bottom"], | |
["image", "glass-overlay.png", 0, 0], | |
["borderImage", "border-on-top-of-that.png", 0, 0] | |
] | |
/* | |
The downside of this approach is that cascading will not work. | |
The downside of DOM/CSS way is that I would have to create 6 additional elements and stack them on top of each other. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment