Skip to content

Instantly share code, notes, and snippets.

@matthooks
Last active August 29, 2015 13:57
Show Gist options
  • Save matthooks/9514511 to your computer and use it in GitHub Desktop.
Save matthooks/9514511 to your computer and use it in GitHub Desktop.
.user-profile {}
.user-profile__avatar {}
.user-profile__name {}
.user-profile__description {}
.user-profile__description__paragraph {}
.user-profile__website-link {}
// is faster than
.user-profile {}
.user-profile .avatar {}
.user-profile .name {}
.user-profile .description {}
.user-profile .description .paragraph {}
.user-profile .website-link {}
// is way faster than
.user-profile {}
.user-profile > img {}
.user-profile > h1 {}
.user-profile > div {}
.user-profile > div > p {}
.user-profile > a {}
<div class="user-profile">
<img src="x.jpg" class="user-profile__avatar">
<h1 class="user-profile__name">
Bob Smith
</h1>
<div class="user-profile__description">
<p class="user-profile__description__paragraph">
lorem
</p>
<p class="user-profile__description__paragraph">
lorem
</p>
</div>
<a href="http://google.com" class="user-profile__website-link">
http://google.com
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment