Skip to content

Instantly share code, notes, and snippets.

@hshoff
Created October 14, 2011 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hshoff/1287032 to your computer and use it in GitHub Desktop.
Save hshoff/1287032 to your computer and use it in GitHub Desktop.
Airbnb - Star Rating Markup Namespace by Harry Shoff
<!-- stars.html.erb -->
<div class="stars empty">
<div class="stars filled"></div>
</div>
<!--
This way you can namespace your selectors.
The markup isn't as pretty, but you can
sleep soundly knowing other developers
won't override your styling properties.
This is easy to do with SASS by using
the "&" as a parent reference in nested
attributes.
example:
.stars {
// stars class styling
&.filled {
// stars and filled class styling
}
}
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment