_base.scss 2.9 KB

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