Developing a legal IDE based on Atom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

448 lines
7.4 KiB

  1. // All of our block level items should have the same margin
  2. @margin: 16px;
  3. // This is styling for generic markdownized text. Anything you put in a
  4. // container with .markdown-body on it should render generally well. It also
  5. // includes some GitHub Flavored Markdown specific styling (like @mentions)
  6. .markdown-body {
  7. overflow: hidden;
  8. font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
  9. font-size: 16px;
  10. line-height: 1.6;
  11. word-wrap: break-word;
  12. > *:first-child {
  13. margin-top: 0 !important;
  14. }
  15. > *:last-child {
  16. margin-bottom: 0 !important;
  17. }
  18. // Anchors like <a name="examples">. These sometimes end up wrapped around
  19. // text when users mistakenly forget to close the tag or use self-closing tag
  20. // syntax. We don't want them to appear like links.
  21. // FIXME: a:not(:link):not(:visited) would be a little clearer here (and
  22. // possibly faster to match), but it breaks styling of <a href> elements due
  23. // to https://bugs.webkit.org/show_bug.cgi?id=142737.
  24. a:not([href]) {
  25. color: inherit;
  26. text-decoration: none;
  27. }
  28. // Link Colors
  29. .absent {
  30. color: #c00;
  31. }
  32. .anchor {
  33. position: absolute;
  34. top: 0;
  35. left: 0;
  36. display: block;
  37. padding-right: 6px;
  38. padding-left: 30px;
  39. margin-left: -30px;
  40. &:focus {
  41. outline: none;
  42. }
  43. }
  44. // Headings
  45. h1, h2, h3, h4, h5, h6 {
  46. position: relative;
  47. margin-top: 1em;
  48. margin-bottom: @margin;
  49. font-weight: bold;
  50. line-height: 1.4;
  51. .octicon-link {
  52. display: none;
  53. color: #000;
  54. vertical-align: middle;
  55. }
  56. &:hover .anchor {
  57. padding-left: 8px;
  58. margin-left: -30px;
  59. text-decoration: none;
  60. .octicon-link {
  61. display: inline-block;
  62. }
  63. }
  64. tt,
  65. code {
  66. font-size: inherit;
  67. }
  68. }
  69. h1 {
  70. padding-bottom: 0.3em;
  71. font-size: 2.25em;
  72. line-height: 1.2;
  73. border-bottom: 1px solid #eee;
  74. .anchor {
  75. line-height: 1;
  76. }
  77. }
  78. h2 {
  79. padding-bottom: 0.3em;
  80. font-size: 1.75em;
  81. line-height: 1.225;
  82. border-bottom: 1px solid #eee;
  83. .anchor {
  84. line-height: 1;
  85. }
  86. }
  87. h3 {
  88. font-size: 1.5em;
  89. line-height: 1.43;
  90. .anchor {
  91. line-height: 1.2;
  92. }
  93. }
  94. h4 {
  95. font-size: 1.25em;
  96. .anchor {
  97. line-height: 1.2;
  98. }
  99. }
  100. h5 {
  101. font-size: 1em;
  102. .anchor {
  103. line-height: 1.1;
  104. }
  105. }
  106. h6 {
  107. font-size: 1em;
  108. color: #777;
  109. .anchor {
  110. line-height: 1.1;
  111. }
  112. }
  113. p,
  114. blockquote,
  115. ul, ol, dl,
  116. table,
  117. pre {
  118. margin-top: 0;
  119. margin-bottom: @margin;
  120. }
  121. hr {
  122. height: 4px;
  123. padding: 0;
  124. margin: @margin 0;
  125. background-color: #e7e7e7;
  126. border: 0 none;
  127. }
  128. // Lists, Blockquotes & Such
  129. ul,
  130. ol {
  131. padding-left: 2em;
  132. &.no-list {
  133. padding: 0;
  134. list-style-type: none;
  135. }
  136. }
  137. // Did someone complain about list spacing? Encourage them
  138. // to create the spacing with their markdown formatting.
  139. // List behavior should be controled by the markup, not the css.
  140. //
  141. // For lists with padding between items, use blank
  142. // lines between items. This will generate paragraphs with
  143. // padding to space things out.
  144. //
  145. // - item
  146. //
  147. // - item
  148. //
  149. // - item
  150. //
  151. // For list without padding, don't use blank lines.
  152. //
  153. // - item
  154. // - item
  155. // - item
  156. //
  157. // Modifying the css to emulate these behaviors merely brakes
  158. // one case in the process of solving another. Don't change
  159. // this unless it's really really a bug.
  160. ul ul,
  161. ul ol,
  162. ol ol,
  163. ol ul {
  164. margin-top: 0;
  165. margin-bottom: 0;
  166. }
  167. li > p {
  168. margin-top: @margin;
  169. }
  170. dl {
  171. padding: 0;
  172. }
  173. dl dt {
  174. padding: 0;
  175. margin-top: @margin;
  176. font-size: 1em;
  177. font-style: italic;
  178. font-weight: bold;
  179. }
  180. dl dd {
  181. padding: 0 @margin;
  182. margin-bottom: @margin;
  183. }
  184. blockquote {
  185. padding: 0 15px;
  186. color: #777;
  187. border-left: 4px solid #ddd;
  188. > :first-child {
  189. margin-top: 0;
  190. }
  191. > :last-child {
  192. margin-bottom: 0;
  193. }
  194. }
  195. // Tables
  196. table {
  197. display: block;
  198. width: 100%;
  199. overflow: auto;
  200. word-break: normal;
  201. word-break: keep-all; // For Firefox to horizontally scroll wider tables.
  202. th {
  203. font-weight: bold;
  204. }
  205. th, td {
  206. padding: 6px 13px;
  207. border: 1px solid #ddd;
  208. }
  209. tr {
  210. background-color: #fff;
  211. border-top: 1px solid #ccc;
  212. &:nth-child(2n) {
  213. background-color: #f8f8f8;
  214. }
  215. }
  216. }
  217. // Images & Stuff
  218. img {
  219. max-width: 100%;
  220. -moz-box-sizing: border-box;
  221. box-sizing: border-box;
  222. }
  223. .emoji {
  224. max-width: none;
  225. }
  226. // Gollum Image Tags
  227. // Framed
  228. span.frame {
  229. display: block;
  230. overflow: hidden;
  231. & > span {
  232. display: block;
  233. float: left;
  234. width: auto;
  235. padding: 7px;
  236. margin: 13px 0 0;
  237. overflow: hidden;
  238. border: 1px solid #ddd;
  239. }
  240. span img {
  241. display: block;
  242. float: left;
  243. }
  244. span span {
  245. display: block;
  246. padding: 5px 0 0;
  247. clear: both;
  248. color: #333;
  249. }
  250. }
  251. span.align-center {
  252. display: block;
  253. overflow: hidden;
  254. clear: both;
  255. & > span {
  256. display: block;
  257. margin: 13px auto 0;
  258. overflow: hidden;
  259. text-align: center;
  260. }
  261. span img {
  262. margin: 0 auto;
  263. text-align: center;
  264. }
  265. }
  266. span.align-right {
  267. display: block;
  268. overflow: hidden;
  269. clear: both;
  270. & > span {
  271. display: block;
  272. margin: 13px 0 0;
  273. overflow: hidden;
  274. text-align: right;
  275. }
  276. span img {
  277. margin: 0;
  278. text-align: right;
  279. }
  280. }
  281. span.float-left {
  282. display: block;
  283. float: left;
  284. margin-right: 13px;
  285. overflow: hidden;
  286. span {
  287. margin: 13px 0 0;
  288. }
  289. }
  290. span.float-right {
  291. display: block;
  292. float: right;
  293. margin-left: 13px;
  294. overflow: hidden;
  295. & > span {
  296. display: block;
  297. margin: 13px auto 0;
  298. overflow: hidden;
  299. text-align: right;
  300. }
  301. }
  302. // Inline code snippets
  303. code,
  304. tt {
  305. padding: 0;
  306. padding-top: 0.2em;
  307. padding-bottom: 0.2em;
  308. margin: 0;
  309. font-size: 85%;
  310. background-color: rgba(0,0,0,0.04);
  311. border-radius: 3px; // don't add padding, gives scrollbars
  312. &:before,
  313. &:after {
  314. letter-spacing: -0.2em; // this creates padding
  315. content: "\00a0";
  316. }
  317. br { display: none; }
  318. }
  319. del code { text-decoration: inherit; }
  320. // Code tags within code blocks (<pre>s)
  321. pre > code {
  322. padding: 0;
  323. margin: 0;
  324. font-size: 100%;
  325. word-break: normal;
  326. white-space: pre;
  327. background: transparent;
  328. border: 0;
  329. }
  330. .highlight {
  331. margin-bottom: @margin;
  332. }
  333. .highlight pre,
  334. pre {
  335. padding: @margin;
  336. overflow: auto;
  337. font-size: 85%;
  338. line-height: 1.45;
  339. background-color: #f7f7f7;
  340. border-radius: 3px;
  341. }
  342. .highlight pre {
  343. margin-bottom: 0;
  344. word-break: normal;
  345. }
  346. pre {
  347. word-wrap: normal;
  348. }
  349. pre code,
  350. pre tt {
  351. display: inline;
  352. max-width: initial;
  353. padding: 0;
  354. margin: 0;
  355. overflow: initial;
  356. line-height: inherit;
  357. word-wrap: normal;
  358. background-color: transparent;
  359. border: 0;
  360. &:before,
  361. &:after {
  362. content: normal;
  363. }
  364. }
  365. kbd {
  366. display: inline-block;
  367. padding: 3px 5px;
  368. font-size: 11px;
  369. line-height: 10px;
  370. color: #555;
  371. vertical-align: middle;
  372. background-color: #fcfcfc;
  373. border: solid 1px #ccc;
  374. border-bottom-color: #bbb;
  375. border-radius: 3px;
  376. box-shadow: inset 0 -1px 0 #bbb;
  377. }
  378. }