Created
November 13, 2013 15:14
-
-
Save sturobson/7450697 to your computer and use it in GitHub Desktop.
naming convention opinion...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm front-end'ing a site for a client that has a 'favourite' or 'star-ing' functionality. | |
My question is, how to name whether the item has been starred or not. | |
Current logic in my CSS has things that are already .is-open, .is-closed, .is-active, .is-inactive, .is-visible and .is-hidden | |
I'm currently toying with | |
.is-favourited and .is-Notfavourited but that's pretty crap | |
Maybe .is-listed, .is-unlisted ? | |
Thoughts? |
I would avoid using favourite in the class title just because the word has spelling variations.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How will the un-starred and un-favourited items differ from being the standard presentation you would see for the item initially? Based on this answer, I would say gives you a reason for the negative classes.
I can see a need for is-closed/is-open as you might re present this give the current state is-open, is-closed (in an expanded navigation as an example).
So with that in mind I would go for the positive classes for these being;
.is-starred
.is-favourite or .is-fav