Created
December 19, 2015 17:55
-
-
Save kellishouts/d597e869950f1f8ffe68 to your computer and use it in GitHub Desktop.
SCSS Day - Semifinal SCSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PROCESS | |
// 1. Set basic variables & media query ranges x | |
// 2. Style large blocks with bg colors for layout x | |
// 3. Get general layout elements (block) sized for all media queries x | |
// 4. Modify general layout elements with & x | |
// 5. Secondary features grid (S --> L) | |
// 6. Typography & Image Sizes x | |
// 7. Refactor the SCSS to make it dryer & simpler. | |
// 8. Set variables for common values. | |
// RESETS & FRAMEWORKS | |
@import "partials/reset"; | |
// VARIABLES & MIXINS | |
$primary: #655643; | |
$secondary: #80BCA3; | |
$tertiary: #E6AC27; | |
$background: #F6F7BD; | |
// MEDIA QUERY RANGES | |
$medium: "only screen and (min-width:600px)"; | |
$large: "only screen and (min-width:900px)"; | |
// GENERAL STYLES | |
body{ | |
background-color: $tertiary; | |
} | |
h1{ | |
color: $tertiary; | |
font-family: 'Oswald', sans-serif; | |
font-weight: normal; | |
font-size: 30px; | |
text-align: center; | |
@media #{$medium}{ | |
font-size: 60px; | |
color: $secondary; | |
} | |
@media #{$large}{ | |
font-size: 72px; | |
} | |
} | |
h2{ | |
color: $secondary; | |
font-family: 'Oswald', sans-serif; | |
font-weight: normal; | |
font-size: 16px; | |
padding-bottom: (16px/2); | |
@media #{$medium}{ | |
color: $tertiary; | |
font-size: 26px; | |
padding-bottom: (26px/2); | |
} | |
@media #{$large}{ | |
font-size: 36px; | |
padding-bottom: (36px/2); | |
} | |
} | |
p{ | |
color: $primary; | |
font-family: 'Roboto Condensed', sans-serif; | |
font-weight: 300; | |
font-size: 14px; | |
line-height: 18px; | |
+ p{ | |
margin-top: 18px; | |
} | |
+ img{ | |
margin-top: 18px; | |
+ p{ | |
margin-top: 18px; | |
} | |
} | |
@media #{$medium}{ | |
font-size: 16px; | |
line-height: 21px; | |
} | |
@media #{$large}{ | |
font-size: 18px; | |
line-height: 24px; | |
} | |
} | |
.block{ | |
margin: auto; | |
background-color: lighten($background, 10%); | |
padding: 25px; | |
@media #{$medium}{ | |
background-color: lighten($secondary, 30%); | |
padding: 50px; | |
} | |
@media #{$large}{ | |
background-color: lighten($tertiary, 35%); | |
padding: 100px; | |
max-width: 850px; | |
} | |
&.block-title{ | |
padding-top: 50px; | |
padding-bottom: 50px; | |
@media #{$medium}{ | |
padding-top: 75px; | |
padding-bottom: 75px; | |
} | |
} | |
&.block-intro{ | |
border-top: 5px solid $tertiary; | |
border-bottom: 5px solid $tertiary; | |
@media #{$medium}{ | |
border-color: $secondary; | |
} | |
@media #{$large}{ | |
border-color: $tertiary; | |
} | |
} | |
&.block-animals{ | |
display: flex; | |
flex-flow: row wrap; | |
justify-content: space-between; | |
.feature{ | |
flex: 0 0 30%; | |
box-sizing: border-box; | |
border: 2px solid $tertiary; | |
margin-bottom: 25px; | |
padding: 25px; | |
img{ | |
max-width: 100%; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment