_base.scss 2.8 KB

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