stylish-elephants
stylish-elephants copied to clipboard
Introduce namespacing to avoid collisions with other CSS on the page?
I've just been fiddling around with stylish-elephants
and one thing I noticed is that the created styles would easily collide with foreign CSS on the page. It'd get even worse if you'd have two separate Elm apps on the same page using different versions of stylish-elephants
. Maybe it'd be a good idea to namespace the CSS classes to prevent collisions. First thought that comes to mind would be using the hash of the library version - maybe using some magic salt value to denote the library that created them - as a prefix/postfix. That way using two apps with the same library version would just work and the hashes would make reasonably sure that hand-written CSS wouldn't get in the way.
It could be an option to layoutWith
.