Skip to content

Instantly share code, notes, and snippets.

@tgandrews
Last active August 29, 2015 14:09
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 tgandrews/53f0c818634d04de288a to your computer and use it in GitHub Desktop.
Save tgandrews/53f0c818634d04de288a to your computer and use it in GitHub Desktop.
SASS Rails pipeline
@import 'common/mixins';
@import 'common/variables'; /* variable $content-max-width defined here */
.main { height: $content-max-width; } /* works */
@import 'common/content'; /* fails, undefined variable $content-max-width */
main {
width: $content-max-width;
display: block;
background-color: $content-bg-color;
margin: 0 auto;
min-height: calc(100% - #{$header-height} - #{$footer-height});
padding: 20px;
font-weight: 1.1em;
line-height: 1.6em;
letter-spacing: 0.01em;
@media screen and (max-width: $break-tablet-portrait) {
width: 100%
}
h2 {
text-align: center;
font-weight: 600;
font-size: 1.2em;
margin-bottom: 1.2em;
}
p {
margin-bottom: 1.2em;
}
span, a {
font-weight: 600;
}
}
$break-tablet-landscape: 1024px;
$break-tablet-portrait: 768px;
$break-phone-landscape: 480px;
$break-phone-portrait: 320px;
$dark-bg-color: #161616;
$body-bg-color: #ecf0f1;
$content-bg-color: #fff;
$header-height: 132px;
$footer-height: 50px;
$font-size-small: 0.8em;
$blog-color: #db334d;
$code-color: #cfc61c;
$quantified-color: #4f47c2;
$content-max-width: 768px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment