_base.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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. }
  159. /* BEGIN COMMUNITYRULE-SPECIFIC CSS */
  160. /* CLASSES */
  161. .callout-text {
  162. font-family: serif;
  163. font-size:2em;
  164. margin:1.5em 0 1em 0;
  165. }
  166. .callout-icon {
  167. font-size:2em;
  168. margin:1.5em 0 1em 0;
  169. }
  170. .editable { /* All editable fields */
  171. padding: 10px 10px 10px 10px;
  172. min-height: 1.5em;
  173. font-family: serif;
  174. border-bottom: 1px dashed gray;
  175. }
  176. .question {
  177. color: gray;
  178. }
  179. /* Tooltip for Modules
  180. https://www.w3schools.com/css/tryit.asp?filename=trycss_tooltip_right
  181. This could bear substantial improvement. */
  182. .button {
  183. position: relative;
  184. display: inline-block;
  185. float: right;
  186. border: 1px solid gray;
  187. color: gray;
  188. background-color: white;
  189. text-align: center;
  190. border-radius: 6px;
  191. padding: 0 5px 0 5px;
  192. }
  193. .button .tooltiptext {
  194. visibility: hidden;
  195. width: 250px;
  196. border: 1px solid black;
  197. background-color: white;
  198. text-align: center;
  199. border-radius: 6px;
  200. padding: 5px 0;
  201. /* Position the tooltip */
  202. position: absolute;
  203. z-index: 1;
  204. right: 100%;
  205. }
  206. .button:hover {
  207. background-color: lightgray;
  208. }
  209. .button:hover .tooltiptext {
  210. visibility: visible;
  211. }
  212. /* pushButton
  213. These are the major functional buttons*/
  214. .pushButton {
  215. border: 1px solid gray;
  216. color: gray;
  217. background-color: white;
  218. text-align: center;
  219. border-radius: 6px;
  220. padding: 5px;
  221. font-size: 1.2em;
  222. }
  223. .pushButton:hover {
  224. background-color: lightgray;
  225. }
  226. .plus { /* The maximize/minimize button */
  227. font-size: 1em;
  228. }
  229. .icons {
  230. /* icons are from https://github.com/tabler/tabler-icons */
  231. margin: 0 5px 0 0;
  232. }
  233. /* VARIOUS IDs */
  234. #rulebox {
  235. border: 1px solid lightgray;
  236. padding: 20px;
  237. margin: 20px 0 30px 0;
  238. }
  239. #rulebox h2 {
  240. font-family: serif;
  241. }
  242. #communityname {
  243. font-weight: bold;
  244. }
  245. #editToggle {
  246. float: right;
  247. clear: both;
  248. }
  249. #toggleDisplayMode {
  250. margin: 0 0 10px 0;
  251. display: none;
  252. }
  253. #publishRule {
  254. margin: 0 0 10px 0;
  255. }
  256. #structure {
  257. font-size: 1.3em;
  258. }
  259. #attribution {
  260. font-family: serif;
  261. font-size: .8em;
  262. text-align: right;
  263. }
  264. #trash {
  265. display: none;
  266. }