Skip to content

Instantly share code, notes, and snippets.

@brandoncordell
Created June 14, 2015 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandoncordell/992502b52bcc51089ca9 to your computer and use it in GitHub Desktop.
Save brandoncordell/992502b52bcc51089ca9 to your computer and use it in GitHub Desktop.
/heres a simple div with an id
#my-div This is my cool div
results: <div id="my-div">This is my cool div</div>
/heres a simple div with a class
.my-div This is my cool div
results: <div class="my-div">This is my cool div</div>
/heres a nested example
.my-div
This is my div with a strong element inside
%strong.my-strong-element This will be bold
results:
<div class="my-div">
This is my cool div
<strong class="my-strong-element">This will be bold</strong>
</div>
/ an example with ruby code
/ setup: @page_title is view variable holding the string "Page One"
%h1.page-title= @page_title
results: <h1 class="page-title">Page One</h1>
/ here it is with concatenation
%h1.page-title "My cool #{@page_title"
results: <h1 class="page-title">My cool Page One</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment