Rainbow stripe mixin with SCSS + Compass
I'm trying to make a horizontal rainbow stripe background gradient mixin, but I feel like this is way too verbose. How can it be better?
- [check] Use variables for colors so they can be swapped out for different colors.
- [check] The widths are hard coded for 8 colors. Can it be done smarter where it adjusts to the number of colors you add? Or is that asking too much?
- [check] The colors are defined twice for the color starts and stops. Can this be done better?
- [see below] Right now I define the colors as variables at the top level, then pass them in the mixin. Should they instead be created inside the mixin and then colors are brought in as arguments? Or does that matter?