Open rosskevin opened 7 years ago
@rosskevin I've found they are quite long too. I think this would be a good move.
In most situations, the className is going to be unique even without the hash.
Do you think we should continue to prepend both the sheet and rule name in dev or do you think it ever gets too verbose?
We should also do something different in prod -- perhaps just a hash and nothing else.
While we are in this area, I find myself prefixing everything in our libraries just to be sure there is no conflict with material-ui. Any thoughts about plugging in a naming strategy for this or allowing prefix/suffix?
The hashes are quite long for class names and can really add up when inspecting elements to figure out adjustments.
For example - checkout the length of the layout (granted I have specified a lot of props):
Instead of generating hashes, how about keeping a global key map based on the prefix and just incrementing the number as needed e.g.
Layout-typeContainer-1
andLayout-typeContainer-2
?As I understand it, we already must ensure that our prefix is unique otherwise we will overwrite other styles, or has this changed?