What's the point of describing a card as red, or black? Why not just describe the suit and let it pass its symbol as part of its identity. Jokers are neither red nor black. So why not just accept stronger more semantic way of passing your classes. Black is just a property. Why not just describe identity of the card, like: This is a "card" let it inherit the identity of a "spade". JS shouldn't care about colors, or symbols. It should just care about value and suit. Let css present what that should look like.
That's a great idea! I will do that. The reason I used .card and .card.red was that the suit is showed in HTML as a text and at current there's no need for suit to have their own style apart from the color, but you proved your point about the semantics.
2
u/cbleslie Sep 03 '15
Neat. The only real improvement you could have passed suit as a class to the card.