_base.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. /**
  2. * Reset some basic elements
  3. */
  4. * {
  5. box-sizing: border-box;
  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. }
  27. /**
  28. * Set `margin-bottom` to maintain vertical rhythm
  29. */
  30. h1, h2, h3, h4, h5, h6,
  31. p, blockquote, pre,
  32. ul, ol, dl, figure,hr,
  33. %vertical-rhythm {
  34. margin-bottom: $spacing-unit / 2;
  35. }
  36. /**
  37. * Images
  38. */
  39. img {
  40. max-width: 100%;
  41. vertical-align: middle;
  42. }
  43. /**
  44. * Figures
  45. */
  46. figure > img {
  47. display: block;
  48. }
  49. figcaption {
  50. font-size: $small-font-size;
  51. }
  52. /**
  53. * Lists
  54. */
  55. li {
  56. //list-style: none;
  57. list-style-position: inside;
  58. > ul,
  59. > ol {
  60. margin-bottom: 0;
  61. }
  62. }
  63. .post-content li {
  64. // The same as p
  65. margin-left: 2em;
  66. }
  67. /**
  68. * Headings
  69. */
  70. h1, h2, h3, h4, h5, h6 {
  71. font-weight: $base-font-bold;
  72. color: $blue;
  73. }
  74. h1 {
  75. font-size: $font-size-h1;
  76. }
  77. h2 {
  78. font-size: $font-size-h2;
  79. }
  80. h3 {
  81. font-size: $font-size-h3;
  82. }
  83. h4 {
  84. font-size: $font-size-h4;
  85. }
  86. h5 {
  87. font-size: $font-size-h5;
  88. }
  89. h6 {
  90. font-size: $font-size-h6;
  91. }
  92. /**
  93. * Blockquotes
  94. */
  95. blockquote {
  96. color: $grey-color;
  97. font-weight: bold;
  98. border-left: 0.3em solid $blue;
  99. padding: $spacing-unit / 2;
  100. background-color: lighten($light-blue,5%);
  101. li {
  102. color: $blue;
  103. margin-bottom: 0.5em;
  104. list-style-position: outside;
  105. }
  106. li:last-child {
  107. margin-bottom: 0;
  108. }
  109. h1, h2, h3, h4, h5, h6 {
  110. color: $grey-color;
  111. text-shadow: 1px 1px $light-blue ,2px 2px $blue;
  112. }
  113. >:last-child {
  114. margin-bottom: 0;
  115. }
  116. }
  117. /**
  118. * hr
  119. */
  120. hr {
  121. border: none;
  122. border-top: 2px dashed $light-blue;
  123. }
  124. /**
  125. * Code formatting
  126. */
  127. pre,
  128. code {
  129. color: $blue;
  130. @include border-radius(0.5em);
  131. }
  132. code {
  133. font:$base-font-weight #{$small-font-size}/#{$base-line-height*1.2} $base-font-code;
  134. padding: 2px 5px;
  135. margin: 0 2px;
  136. word-break:break-all;
  137. }
  138. pre {
  139. padding: 8px 12px;
  140. overflow-x: auto;
  141. border: 2px solid $light-blue;
  142. > code {
  143. padding-right: 0;
  144. padding-left: 0;
  145. }
  146. }
  147. /**
  148. * p
  149. */
  150. p {
  151. text-align: justify;
  152. word-wrap: break-word;
  153. }
  154. .post-content {
  155. p {
  156. text-indent: 2em;
  157. }
  158. blockquote p {
  159. text-indent: 0;
  160. }
  161. }
  162. /**
  163. * Wrapper
  164. */
  165. .wrapper {
  166. //max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
  167. max-width: 740px;
  168. margin-right: auto;
  169. margin-left: auto;
  170. padding-right: $spacing-unit;
  171. padding-left: $spacing-unit;
  172. @extend %clearfix;
  173. }
  174. /**
  175. * Clearfix
  176. */
  177. %clearfix {
  178. &:after {
  179. content: "";
  180. display: table;
  181. clear: both;
  182. }
  183. }
  184. /**
  185. * Icons
  186. */
  187. .icon {
  188. > svg {
  189. display: inline-block;
  190. width: 16px;
  191. height: 16px;
  192. vertical-align: middle;
  193. path {
  194. fill: $grey-color;
  195. }
  196. }
  197. }
  198. /**
  199. * Table
  200. */
  201. table {
  202. border-collapse: collapse;
  203. font-size: $small-font-size;
  204. border:solid $light-blue;
  205. border-width:1px 0px 0px 1px;
  206. margin-bottom: 15px;
  207. th {
  208. color: $grey-color;
  209. background-color: $light-blue;
  210. padding: 5px;
  211. border:solid $light-blue;
  212. border-width:0px 1px 1px 0px;
  213. }
  214. td {
  215. padding: 5px;
  216. border:solid $light-blue;
  217. border-width:0px 1px 1px 0px;
  218. }
  219. }