themes/hugo-coder/assets/scss/_base.scss
6160cb2e70e37fcf6e897f45c110274b8777012c
· 3.7 KB · 273 lines
raw
| 1 | *, |
| 2 | *:after, |
| 3 | *:before { |
| 4 | box-sizing: inherit; |
| 5 | } |
| 6 | |
| 7 | html { |
| 8 | box-sizing: border-box; |
| 9 | font-size: 62.5%; |
| 10 | } |
| 11 | |
| 12 | body { |
| 13 | color: $fg-color; |
| 14 | background-color: $bg-color; |
| 15 | font-family: $font-family; |
| 16 | font-size: 1.8em; |
| 17 | font-weight: 400; |
| 18 | line-height: 1.8em; |
| 19 | |
| 20 | @media only screen and (max-width: 768px) { |
| 21 | font-size: 1.6em; |
| 22 | line-height: 1.6em; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | a { |
| 27 | font-weight: 500; |
| 28 | color: $link-color; |
| 29 | text-decoration: none; |
| 30 | transition: all 0.25s ease-in; |
| 31 | |
| 32 | &:focus, |
| 33 | &:hover { |
| 34 | text-decoration: underline; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | p { |
| 39 | margin: 2rem 0 2rem 0; |
| 40 | } |
| 41 | |
| 42 | h1, |
| 43 | h2, |
| 44 | h3, |
| 45 | h4, |
| 46 | h5, |
| 47 | h6 { |
| 48 | font-family: $font-family; |
| 49 | font-weight: 600; |
| 50 | color: $alt-fg-color; |
| 51 | margin: 4rem 0 2.5rem 0; |
| 52 | |
| 53 | &:hover .heading-link { |
| 54 | visibility: visible; |
| 55 | } |
| 56 | |
| 57 | .heading-link { |
| 58 | color: $link-color; |
| 59 | font-weight: inherit; |
| 60 | text-decoration: none; |
| 61 | font-size: 80%; |
| 62 | visibility: hidden; |
| 63 | } |
| 64 | |
| 65 | .title-link { |
| 66 | color: inherit; |
| 67 | font-weight: inherit; |
| 68 | text-decoration: none; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | h1 { |
| 73 | font-size: 3.2rem; |
| 74 | line-height: 3.6rem; |
| 75 | |
| 76 | @media only screen and (max-width: 768px) { |
| 77 | font-size: 3rem; |
| 78 | line-height: 3.4rem; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | h2 { |
| 83 | font-size: 2.8rem; |
| 84 | line-height: 3.2rem; |
| 85 | |
| 86 | @media only screen and (max-width: 768px) { |
| 87 | font-size: 2.6rem; |
| 88 | line-height: 3rem; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | h3 { |
| 93 | font-size: 2.4rem; |
| 94 | line-height: 2.8rem; |
| 95 | |
| 96 | @media only screen and (max-width: 768px) { |
| 97 | font-size: 2.2rem; |
| 98 | line-height: 2.6rem; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | h4 { |
| 103 | font-size: 2.2rem; |
| 104 | line-height: 2.6rem; |
| 105 | |
| 106 | @media only screen and (max-width: 768px) { |
| 107 | font-size: 2rem; |
| 108 | line-height: 2.4rem; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | h5 { |
| 113 | font-size: 2rem; |
| 114 | line-height: 2.4rem; |
| 115 | |
| 116 | @media only screen and (max-width: 768px) { |
| 117 | font-size: 1.8rem; |
| 118 | line-height: 2.2rem; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | h6 { |
| 123 | font-size: 1.8rem; |
| 124 | line-height: 2.2rem; |
| 125 | |
| 126 | @media only screen and (max-width: 768px) { |
| 127 | font-size: 1.6rem; |
| 128 | line-height: 2rem; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | b, |
| 133 | strong { |
| 134 | font-weight: 700; |
| 135 | } |
| 136 | |
| 137 | .highlight>div, |
| 138 | .highlight>pre { |
| 139 | margin: 0 0 2rem; |
| 140 | padding: 1rem; |
| 141 | border-radius: 1rem; |
| 142 | } |
| 143 | |
| 144 | pre { |
| 145 | display: block; |
| 146 | font-family: $code-font-family; |
| 147 | font-size: 1.6rem; |
| 148 | font-weight: 400; |
| 149 | line-height: 2.6rem; |
| 150 | overflow-x: auto; |
| 151 | margin: 0; |
| 152 | |
| 153 | code { |
| 154 | display: inline-block; |
| 155 | background-color: inherit; |
| 156 | color: inherit; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | code { |
| 161 | font-family: $code-font-family; |
| 162 | font-size: 1.6rem; |
| 163 | font-weight: 400; |
| 164 | background-color: $alt-bg-color; |
| 165 | color: $fg-color; |
| 166 | border-radius: 0.6rem; |
| 167 | padding: 0.3rem 0.6rem; |
| 168 | } |
| 169 | |
| 170 | blockquote { |
| 171 | border-left: 2px solid $alt-bg-color; |
| 172 | padding-left: 2rem; |
| 173 | line-height: 2.2rem; |
| 174 | font-weight: 400; |
| 175 | font-style: italic; |
| 176 | } |
| 177 | |
| 178 | th, |
| 179 | td { |
| 180 | padding: 1.6rem; |
| 181 | } |
| 182 | |
| 183 | table { |
| 184 | border-collapse: collapse; |
| 185 | } |
| 186 | |
| 187 | table td, |
| 188 | table th { |
| 189 | border: 2px solid $alt-fg-color; |
| 190 | } |
| 191 | |
| 192 | table tr:first-child th { |
| 193 | border-top: 0; |
| 194 | } |
| 195 | |
| 196 | table tr:last-child td { |
| 197 | border-bottom: 0; |
| 198 | } |
| 199 | |
| 200 | table tr td:first-child, |
| 201 | table tr th:first-child { |
| 202 | border-left: 0; |
| 203 | } |
| 204 | |
| 205 | table tr td:last-child, |
| 206 | table tr th:last-child { |
| 207 | border-right: 0; |
| 208 | } |
| 209 | |
| 210 | img { |
| 211 | max-width: 100%; |
| 212 | } |
| 213 | |
| 214 | figure { |
| 215 | text-align: center; |
| 216 | } |
| 217 | |
| 218 | .preload-transitions * { |
| 219 | $null-transition: none !important; |
| 220 | |
| 221 | -webkit-transition: $null-transition; |
| 222 | -moz-transition: $null-transition; |
| 223 | -ms-transition: $null-transition; |
| 224 | -o-transition: $null-transition; |
| 225 | transition: $null-transition; |
| 226 | } |
| 227 | |
| 228 | .wrapper { |
| 229 | display: flex; |
| 230 | flex-direction: column; |
| 231 | |
| 232 | min-height: 100vh; |
| 233 | width: 100%; |
| 234 | } |
| 235 | |
| 236 | .container { |
| 237 | margin: 1rem auto; |
| 238 | max-width: 90rem; |
| 239 | width: 100%; |
| 240 | padding-left: 2rem; |
| 241 | padding-right: 2rem; |
| 242 | } |
| 243 | |
| 244 | .fab { |
| 245 | font-weight: 400; |
| 246 | } |
| 247 | |
| 248 | .fas { |
| 249 | font-weight: 700; |
| 250 | } |
| 251 | |
| 252 | .float-right { |
| 253 | float: right; |
| 254 | } |
| 255 | |
| 256 | .float-left { |
| 257 | float: left; |
| 258 | } |
| 259 | |
| 260 | .fab { |
| 261 | font-weight: 400; |
| 262 | } |
| 263 | |
| 264 | .fas { |
| 265 | font-weight: 900; |
| 266 | } |
| 267 | |
| 268 | img.emoji { |
| 269 | height: 1em; |
| 270 | width: 1em; |
| 271 | margin: 0 0.05em 0 0.1em; |
| 272 | vertical-align: -0.1em; |
| 273 | } |