Skip to content

Instantly share code, notes, and snippets.

@matt-diehl
Last active April 21, 2017 21:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matt-diehl/5178112 to your computer and use it in GitHub Desktop.
Save matt-diehl/5178112 to your computer and use it in GitHub Desktop.
An example of a module written in Sass.
/* ===== Contact Form Styles ===== */
// Base styles
.contact_form {
background: #FFF;
border: 4px solid #999;
padding: 10px;
}
.contact_form-label {
color: #000;
font-weight: bold;
}
.contact_form-styled_input {
border: 1px solid #CCC;
padding: 2px 4px;
}
// Mobile-only styles
@include mobile-only {
.contact_form-label {
display: block;
font-size: 1em;
}
.contact_form-styled_input {
display: block;
font-size: 1em;
}
}
// Desktop-only styles
@include desktop-only {
.contact_form-label {
display: inline-block;
font-size: 1.2em;
}
.contact_form-styled_input {
display: inline-block;
font-size: 1.2em;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment