_base.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. * Basic styling
  12. */
  13. body {
  14. font-family: $base-font-family;
  15. font-size: $base-font-size;
  16. line-height: $base-line-height;
  17. font-weight: 300;
  18. color: $text-color;
  19. background-color: $background-color;
  20. -webkit-text-size-adjust: 100%;
  21. }
  22. /**
  23. * Set `margin-bottom` to maintain vertical rhythm
  24. */
  25. h1, h2, h3, h4, h5, h6,
  26. p, blockquote, pre,
  27. ul, ol, dl, figure,
  28. %vertical-rhythm {
  29. margin-bottom: $spacing-unit / 2;
  30. }
  31. /**
  32. * Images
  33. */
  34. img {
  35. max-width: 100%;
  36. vertical-align: middle;
  37. }
  38. /**
  39. * Figures
  40. */
  41. figure > img {
  42. display: block;
  43. }
  44. figcaption {
  45. font-size: $small-font-size;
  46. }
  47. /**
  48. * Lists
  49. */
  50. ul, ol {
  51. margin-left: $spacing-unit;
  52. }
  53. li {
  54. > ul,
  55. > ol {
  56. margin-bottom: 0;
  57. }
  58. }
  59. /**
  60. * Headings
  61. */
  62. h1, h2, h3, h4, h5, h6 {
  63. font-weight: 300;
  64. }
  65. /**
  66. * Links
  67. */
  68. a {
  69. color: $brand-color;
  70. text-decoration: none;
  71. &:visited {
  72. color: darken($brand-color, 15%);
  73. }
  74. &:hover {
  75. color: $text-color;
  76. text-decoration: underline;
  77. }
  78. }
  79. /**
  80. * Blockquotes
  81. */
  82. blockquote {
  83. color: $grey-color;
  84. border-left: 4px solid $grey-color-light;
  85. padding-left: $spacing-unit / 2;
  86. font-size: 18px;
  87. letter-spacing: -1px;
  88. font-style: italic;
  89. > :last-child {
  90. margin-bottom: 0;
  91. }
  92. }
  93. /**
  94. * Code formatting
  95. */
  96. pre,
  97. code {
  98. font-size: 15px;
  99. border: 1px solid $grey-color-light;
  100. border-radius: 3px;
  101. background-color: #eef;
  102. }
  103. code {
  104. padding: 1px 5px;
  105. }
  106. pre {
  107. padding: 8px 12px;
  108. overflow-x: scroll;
  109. > code {
  110. border: 0;
  111. padding-right: 0;
  112. padding-left: 0;
  113. }
  114. }
  115. /**
  116. * Wrapper
  117. */
  118. .wrapper {
  119. max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
  120. max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
  121. margin-right: auto;
  122. margin-left: auto;
  123. padding-right: $spacing-unit;
  124. padding-left: $spacing-unit;
  125. @extend %clearfix;
  126. @include media-query($on-laptop) {
  127. max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
  128. max-width: calc(#{$content-width} - (#{$spacing-unit}));
  129. padding-right: $spacing-unit / 2;
  130. padding-left: $spacing-unit / 2;
  131. }
  132. }
  133. /**
  134. * Clearfix
  135. */
  136. %clearfix {
  137. &:after {
  138. content: "";
  139. display: table;
  140. clear: both;
  141. }
  142. }
  143. /**
  144. * Icons
  145. */
  146. .icon {
  147. > svg {
  148. display: inline-block;
  149. width: 16px;
  150. height: 16px;
  151. vertical-align: middle;
  152. path {
  153. fill: $grey-color;
  154. }
  155. }
  156. }