Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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