ConchordanceProject / ConchordanceWeb

A webapp for exploring chord fingerings for any fretted instrument.
4 stars 0 forks source link

Share colors between CSS and JS #23

Closed jbauschatz closed 10 years ago

jbauschatz commented 10 years ago

The chord fingerings and instruments are being rendered programmatically as SVG, and so all colors for the frets, strings, diagrams, etc, are specified in JS.

This can create some redundancy if we are synchronizing the color scheme with the webapp itself. It would be nice to somehow declare colors once in CSS and then access them in JS. Can LESS do this for us? @civilframe, thoughts?

alexnsolo commented 10 years ago

Yes, LESS can do this for us. I think that would be a good way to go!

jbauschatz commented 10 years ago

I think we'll solve the problem by using CSS classes to style SVG elements, rather than programmatically adding style via JS. Now that Alex F has created the simple-svg library, we won't need Raphael at all, and we'll use consistent classes for all SVG elements.