equitablegrowth / Playfair

Web application for creating publication ready charts and graphs
http://www.austinclemens.com/Playfair/playfair.html
56 stars 6 forks source link

this thing with maps and css selectors is still around #298

Open austinclemens opened 5 years ago

austinclemens commented 5 years ago

I want to have fips codes as classes for the map paths but technically css does not like selectors that begin with a number. There are two workarounds. The first is to convert the first digit to a utf-8 code. I can't get this to work just yet. The second is to use an attribute selector: [class='46102'] for example but this doesn't work when you have assigned more than one class to a path, which I would like to do (for states for example, to assign both the name and abbreviation and fips). So that's out. Another possibility is to append a letter to the start of all path classes and then do the same for all variable geography ids