_base.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. html {
  2. font-size: $base-font-size;
  3. }
  4. /**
  5. * Reset some basic elements
  6. */
  7. body, h1, h2, h3, h4, h5, h6,
  8. p, blockquote, pre, hr,
  9. dl, dd, ol, ul, figure {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. /**
  14. * Basic styling
  15. */
  16. body {
  17. font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
  18. color: $text-color;
  19. background-color: $background-color;
  20. -webkit-text-size-adjust: 100%;
  21. -webkit-font-feature-settings: "kern" 1;
  22. -moz-font-feature-settings: "kern" 1;
  23. -o-font-feature-settings: "kern" 1;
  24. font-feature-settings: "kern" 1;
  25. font-kerning: normal;
  26. display: flex;
  27. min-height: 100vh;
  28. flex-direction: column;
  29. overflow-wrap: break-word;
  30. }
  31. /**
  32. * Set `margin-bottom` to maintain vertical rhythm
  33. */
  34. h1, h2, h3, h4, h5, h6,
  35. p, blockquote, pre,
  36. ul, ol, dl, figure,
  37. %vertical-rhythm {
  38. margin-bottom: $spacing-unit * .5;
  39. }
  40. hr {
  41. margin-top: $spacing-unit;
  42. margin-bottom: $spacing-unit;
  43. }
  44. /**
  45. * `main` element
  46. */
  47. main {
  48. display: block; /* Default value of `display` of `main` element is 'inline' in IE 11. */
  49. }
  50. /**
  51. * Images
  52. */
  53. img {
  54. max-width: 100%;
  55. vertical-align: middle;
  56. }
  57. /**
  58. * Figures
  59. */
  60. figure > img {
  61. display: block;
  62. }
  63. figcaption {
  64. font-size: $small-font-size;
  65. }
  66. /**
  67. * Lists
  68. */
  69. ul, ol {
  70. margin-left: $spacing-unit;
  71. }
  72. li {
  73. > ul,
  74. > ol {
  75. margin-bottom: 0;
  76. }
  77. }
  78. /**
  79. * Headings
  80. */
  81. h1, h2, h3, h4, h5, h6 {
  82. color: $heading-color;
  83. font-weight: 500;
  84. }
  85. /**
  86. * Links
  87. */
  88. a {
  89. color: $link-base-color;
  90. text-decoration: none;
  91. &:visited {
  92. color: $link-visited-color;
  93. }
  94. &:hover {
  95. color: $link-hover-color;
  96. text-decoration: underline $brand-color;
  97. text-underline-offset: 3px;
  98. }
  99. .social-media-list &:hover {
  100. text-decoration: none;
  101. .username {
  102. text-decoration: underline;
  103. }
  104. }
  105. }
  106. /**
  107. * Blockquotes
  108. */
  109. blockquote {
  110. color: $brand-color;
  111. border-left: 4px solid $border-color-01;
  112. padding-left: $spacing-unit * .5;
  113. @include relative-font-size(1.05);
  114. font-style: italic;
  115. > :last-child {
  116. margin-bottom: 0;
  117. }
  118. i, em {
  119. font-style: normal;
  120. }
  121. }
  122. /**
  123. * Code formatting
  124. */
  125. pre,
  126. code {
  127. font-family: $code-font-family;
  128. background-color: $code-background-color;
  129. @include media-query($on-palm) {
  130. font-family: monospace;
  131. }
  132. }
  133. pre {
  134. padding: 8px 12px;
  135. font-size: 15px;
  136. line-height: 1.4;
  137. color: $heading-color;
  138. overflow-x: auto;
  139. > code {
  140. display: inline-block;
  141. width: 100%;
  142. }
  143. }
  144. div.highlight, figure.highlight {
  145. @extend %vertical-rhythm;
  146. border: 1px solid $border-color-01;
  147. border-radius: 3px;
  148. pre { margin: 0 }
  149. table, tbody, th, tr, td {
  150. margin: 0;
  151. padding: 0;
  152. border: 0
  153. }
  154. .lineno, .gl { text-align: right }
  155. }
  156. figure.highlight {
  157. table { margin: -8px -12px -14px }
  158. td.gutter { border-right: 1px solid $border-color-01 }
  159. td.code { width: 100% }
  160. }
  161. code.highlighter-rouge {
  162. padding: 1px 5px;
  163. font-size: 14px;
  164. border: 1px solid $border-color-01;
  165. border-radius: 3px;
  166. }
  167. /**
  168. * Wrapper
  169. */
  170. .wrapper {
  171. max-width: $content-width;
  172. margin: 0 auto;
  173. padding: 0 $spacing-unit;
  174. @extend %clearfix;
  175. @media screen and (max-width: $on-medium) {
  176. padding-right: $spacing-unit * 0.6;
  177. padding-left: $spacing-unit * 0.6;
  178. }
  179. }
  180. /**
  181. * Clearfix
  182. */
  183. %clearfix:after {
  184. content: "";
  185. display: table;
  186. clear: both;
  187. }
  188. /**
  189. * Icons
  190. */
  191. .orange {
  192. color: #f66a0a;
  193. }
  194. .grey {
  195. color: #828282;
  196. }
  197. .svg-icon {
  198. width: 1.25em;
  199. height: 1.25em;
  200. display: inline-block;
  201. fill: currentColor;
  202. vertical-align: text-bottom;
  203. overflow: visible;
  204. }
  205. /**
  206. * Tables
  207. */
  208. table {
  209. margin-bottom: $spacing-unit;
  210. width: 100%;
  211. text-align: $table-text-align;
  212. color: $table-text-color;
  213. border-collapse: collapse;
  214. border: 1px solid $table-border-color;
  215. tr {
  216. &:nth-child(even) {
  217. background-color: $table-zebra-color;
  218. }
  219. }
  220. th, td {
  221. padding: ($spacing-unit * 33.3333333333 * .01) ($spacing-unit * .5);
  222. }
  223. th {
  224. background-color: $table-header-bg-color;
  225. border: 1px solid $table-header-border;
  226. }
  227. td {
  228. border: 1px solid $table-border-color;
  229. }
  230. @include media-query($on-laptop) {
  231. display: block;
  232. overflow-x: auto;
  233. -webkit-overflow-scrolling: touch;
  234. -ms-overflow-style: -ms-autohiding-scrollbar;
  235. }
  236. }