bigbiff | d006b30 | 2015-03-06 18:36:03 -0500 | [diff] [blame] | 1 | /** |
| 2 | * Reset some basic elements |
| 3 | */ |
| 4 | body, h1, h2, h3, h4, h5, h6, |
| 5 | p, blockquote, pre, hr, |
| 6 | dl, dd, ol, ul, figure { |
| 7 | margin: 0; |
| 8 | padding: 0; |
| 9 | } |
| 10 | |
| 11 | |
| 12 | |
| 13 | /** |
| 14 | * Basic styling |
| 15 | */ |
| 16 | body { |
| 17 | font-family: $base-font-family; |
| 18 | font-size: $base-font-size; |
| 19 | line-height: $base-line-height; |
| 20 | font-weight: 300; |
| 21 | color: $text-color; |
| 22 | background-color: $background-color; |
| 23 | -webkit-text-size-adjust: 100%; |
| 24 | } |
| 25 | |
| 26 | |
| 27 | |
| 28 | /** |
| 29 | * Set `margin-bottom` to maintain vertical rhythm |
| 30 | */ |
| 31 | h1, h2, h3, h4, h5, h6, |
| 32 | p, blockquote, pre, |
| 33 | ul, ol, dl, figure, |
| 34 | %vertical-rhythm { |
| 35 | margin-bottom: $spacing-unit / 2; |
| 36 | } |
| 37 | |
| 38 | |
| 39 | |
| 40 | /** |
| 41 | * Images |
| 42 | */ |
| 43 | img { |
| 44 | max-width: 100%; |
| 45 | vertical-align: middle; |
| 46 | } |
| 47 | |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * Figures |
| 52 | */ |
| 53 | figure > img { |
| 54 | display: block; |
| 55 | } |
| 56 | |
| 57 | figcaption { |
| 58 | font-size: $small-font-size; |
| 59 | } |
| 60 | |
| 61 | |
| 62 | |
| 63 | /** |
| 64 | * Lists |
| 65 | */ |
| 66 | ul, ol { |
| 67 | margin-left: $spacing-unit; |
| 68 | } |
| 69 | |
| 70 | li { |
| 71 | > ul, |
| 72 | > ol { |
| 73 | margin-bottom: 0; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | |
| 78 | |
| 79 | /** |
| 80 | * Headings |
| 81 | */ |
| 82 | h1, h2, h3, h4, h5, h6 { |
| 83 | font-weight: 300; |
| 84 | } |
| 85 | |
| 86 | |
| 87 | |
| 88 | /** |
| 89 | * Links |
| 90 | */ |
| 91 | a { |
| 92 | color: $brand-color; |
| 93 | text-decoration: none; |
| 94 | |
| 95 | &:visited { |
| 96 | color: darken($brand-color, 15%); |
| 97 | } |
| 98 | |
| 99 | &:hover { |
| 100 | color: $text-color; |
| 101 | text-decoration: underline; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | |
| 106 | |
| 107 | /** |
| 108 | * Blockquotes |
| 109 | */ |
| 110 | blockquote { |
| 111 | color: $grey-color; |
| 112 | border-left: 4px solid $grey-color-light; |
| 113 | padding-left: $spacing-unit / 2; |
| 114 | font-size: 18px; |
| 115 | letter-spacing: -1px; |
| 116 | font-style: italic; |
| 117 | |
| 118 | > :last-child { |
| 119 | margin-bottom: 0; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | |
| 124 | |
| 125 | /** |
| 126 | * Code formatting |
| 127 | */ |
| 128 | pre, |
| 129 | code { |
| 130 | font-size: 15px; |
| 131 | border: 1px solid $grey-color-light; |
| 132 | border-radius: 3px; |
| 133 | background-color: #eef; |
| 134 | } |
| 135 | |
| 136 | code { |
| 137 | padding: 1px 5px; |
| 138 | } |
| 139 | |
| 140 | pre { |
| 141 | padding: 8px 12px; |
| 142 | overflow-x: scroll; |
| 143 | |
| 144 | > code { |
| 145 | border: 0; |
| 146 | padding-right: 0; |
| 147 | padding-left: 0; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | |
| 152 | |
| 153 | /** |
| 154 | * Wrapper |
| 155 | */ |
| 156 | .wrapper { |
| 157 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); |
| 158 | max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); |
| 159 | margin-right: auto; |
| 160 | margin-left: auto; |
| 161 | padding-right: $spacing-unit; |
| 162 | padding-left: $spacing-unit; |
| 163 | @extend %clearfix; |
| 164 | |
| 165 | @include media-query($on-laptop) { |
| 166 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); |
| 167 | max-width: calc(#{$content-width} - (#{$spacing-unit})); |
| 168 | padding-right: $spacing-unit / 2; |
| 169 | padding-left: $spacing-unit / 2; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | |
| 174 | |
| 175 | /** |
| 176 | * Clearfix |
| 177 | */ |
| 178 | %clearfix { |
| 179 | |
| 180 | &:after { |
| 181 | content: ""; |
| 182 | display: table; |
| 183 | clear: both; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | |
| 188 | |
| 189 | /** |
| 190 | * Icons |
| 191 | */ |
| 192 | .icon { |
| 193 | |
| 194 | > svg { |
| 195 | display: inline-block; |
| 196 | width: 16px; |
| 197 | height: 16px; |
| 198 | vertical-align: middle; |
| 199 | |
| 200 | path { |
| 201 | fill: $grey-color; |
| 202 | } |
| 203 | } |
| 204 | } |