new-modern.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. /* Title: New Modern */
  2. /* Author: Jocelyn Richard http://jocelynrichard.com/ */
  3. /* Description: Baseline style, meant to be used on its own or to serve as development basis. */
  4. /* ================================================ */
  5. /* 1. Reset */
  6. /* 2. Skeleton */
  7. /* 3. Media Queries */
  8. /* 4. Print Styles */
  9. /* ================================================ */
  10. /* ================================================ */
  11. /* 1. Reset */
  12. /* ================================================ */
  13. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
  14. b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {margin: 0; padding: 0; border: 0;} /* Edited from http://www.cssreset.com/scripts/eric-meyer-reset-css/ */
  15. article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary {display: block;} /* Semantic tags definition for IE 6/7/8/9 and Firefox 3 */
  16. html {-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;} /* Prevents iOS text size adjust after orientation change, without disabling user zoom */
  17. /* ================================================ */
  18. /* 2. Skeleton */
  19. /* ================================================ */
  20. /* ------------------------------------------------- */
  21. /* General */
  22. /* ------------------------------------------------- */
  23. html {
  24. font-size: 14px;
  25. }
  26. body {
  27. font-family: 'Open Sans', sans-serif;
  28. /*margin: 3.42rem 1.71rem !important;*/ /* Get margins even if the Markdown rendering app doesn't include any */
  29. background-color: white;
  30. color: #222;
  31. }
  32. #wrapper { /* #wrapper: ID added by Marked */
  33. max-width: 42rem;
  34. margin: 0 auto;
  35. margin-left: auto !important; /* Countering toc.css added by Marked */
  36. padding: 1.71rem 0 !important; /* Countering toc.css added by Marked */
  37. }
  38. /* ------------------------------------------------- */
  39. /* Typography */
  40. /* ------------------------------------------------- */
  41. h1,
  42. h2,
  43. h3,
  44. h4,
  45. h5,
  46. h6 {
  47. margin-bottom: 1.6rem;
  48. }
  49. h1,
  50. h2 {
  51. margin-top: 3.2rem;
  52. }
  53. h1 {
  54. font-size: 2.82rem; /* 42.3px @15px */
  55. line-height: 3.2rem; /* 48px @15px */
  56. }
  57. h2 {
  58. font-size: 1.99rem; /* 29.9px @15px */
  59. line-height: 2.4rem; /* 36px @15px */
  60. }
  61. h3 {
  62. font-size: 1.41rem; /* 21.2px @15px */
  63. line-height: 2rem; /* 30px @15px */
  64. }
  65. h4 {
  66. font-size: 1rem; /* 15px @15px */
  67. line-height: 1.6rem; /* 24px @15px */
  68. }
  69. h5, h6 {
  70. font-size: 0.8rem;
  71. line-height: 1.2rem;
  72. text-transform: uppercase;
  73. }
  74. h6 {
  75. margin-left: 1.6rem;
  76. }
  77. p,
  78. ol,
  79. ul,
  80. blockquote {
  81. font-size: 1rem;
  82. line-height: 1.6rem;
  83. margin-bottom: 1.6rem;
  84. }
  85. ul ul,
  86. ul ol,
  87. ol ul,
  88. ol ol {
  89. margin-left: 1.6rem;
  90. margin-top: 1.6rem;
  91. }
  92. #generated-toc ul ul, /* #generated-toc: added by Marked for its table of contents */
  93. #generated-toc ul ol,
  94. #generated-toc ol ul,
  95. #generated-toc ol ol {
  96. margin-top: 0;
  97. margin-bottom: 0;
  98. padding-top: 0;
  99. padding-bottom: 0;
  100. }
  101. blockquote {
  102. margin: 0 0 1.6rem 2.4rem;
  103. padding-left: 0.8rem; /* Voire */
  104. border-left: 4px solid rgba(0,0,0,0.08);
  105. font-style: normal;
  106. }
  107. blockquote ul {
  108. margin-left: 0.8rem; /* Pour ne pas que les hanging bullets mordent sur le blockquote */
  109. }
  110. ol li blockquote, /* So that blockquote work in lists */
  111. ul li blockquote {
  112. margin-left: 0;
  113. }
  114. a:link {
  115. text-decoration: none;
  116. color: #165bd4;
  117. border-bottom: 1px solid #ccc;
  118. }
  119. a:visited {
  120. color: #7697cf;
  121. border-bottom: 1px solid #ccc;
  122. }
  123. a:hover {
  124. border-color: #165bd4;
  125. }
  126. a:active {
  127. background-color: #e6e6e6;
  128. }
  129. /* ------------------------------------------------- */
  130. /* Tables */
  131. /* ------------------------------------------------- */
  132. table {
  133. font-size: 0.85rem;
  134. margin: 0 0 1.6rem 0;
  135. border-collapse: collapse;
  136. border: 1px solid #ccc;
  137. }
  138. th,
  139. td {
  140. padding: 0.5rem 0.75rem;
  141. max-width: 20rem; /* Avoid dropping lines for nothing without having ridiculously wide tables */
  142. }
  143. th {
  144. border-bottom: 2px solid #222;
  145. }
  146. tr {
  147. border-bottom: 1px solid #ccc;
  148. }
  149. tbody tr:nth-child(odd) {
  150. background-color: #f9f9f9;
  151. }
  152. table code {
  153. font-size: 85%;
  154. }
  155. /* ------------------------------------------------- */
  156. /* Misc */
  157. /* ------------------------------------------------- */
  158. img {
  159. max-width: 100%
  160. }
  161. caption,
  162. figcaption {
  163. font-size: 0.85rem;
  164. line-height: 1.6rem;
  165. margin: 0 1.6rem;
  166. text-align: left;
  167. }
  168. figcaption {
  169. margin-bottom: 1.6rem;
  170. }
  171. h1, /* White-space mentions in order to force wrapping */
  172. h2,
  173. a:link,
  174. pre {
  175. white-space: pre; /* CSS 2.0 */
  176. white-space: pre-wrap; /* CSS 2.1 */
  177. white-space: pre-line; /* CSS 3.0 */
  178. white-space: -pre-wrap; /* Opera 4-6 */
  179. white-space: -o-pre-wrap; /* Opera 7 */
  180. white-space: -moz-pre-wrap; /* Mozilla */
  181. white-space: -hp-pre-wrap; /* HP Printers */
  182. word-wrap: break-word; /* IE 5+ */
  183. }
  184. code {
  185. font-family: "Menlo", "Courier New", "Courier", monospace;
  186. font-size: 85%;
  187. color: #666;
  188. background-color: rgba(0,0,0,0.08);
  189. padding: 2px 4px;
  190. border-radius: 2px;
  191. }
  192. pre {
  193. background-color: rgba(0,0,0,0.08);
  194. border-radius: 8px;
  195. padding: 0.4rem;
  196. margin-bottom: 1.6rem;
  197. }
  198. pre code { /* Counter the code mentions */
  199. background-color: transparent;
  200. padding: 0;
  201. }
  202. sup,
  203. sub,
  204. a.footnote { /* Keep line-height from being affected by sub, cf https://gist.github.com/unruthless/413930 */
  205. font-size: 75%;
  206. height: 0;
  207. line-height: 1;
  208. position: relative;
  209. }
  210. sup,
  211. a.footnote {
  212. vertical-align:super;
  213. }
  214. sub {
  215. vertical-align: sub;
  216. }
  217. dt {
  218. font-weight: 600;
  219. }
  220. dd {
  221. font-size: 1rem;
  222. line-height: 1.6rem;
  223. margin-bottom: 1.6rem;
  224. }
  225. hr {
  226. clear: none;
  227. height: 0.2rem;
  228. border: none;
  229. margin: 0 auto 1.4rem auto; /* 2.4rem auto 2.2rem auto; */
  230. width: 100%;
  231. color: #ccc;
  232. background-color: #ccc;
  233. }
  234. ::selection {
  235. background-color: #f8dc77;
  236. }
  237. ::-moz-selection {
  238. background-color: #f8dc77;
  239. }
  240. a:focus {
  241. outline: 2px solid;
  242. outline-color: #165bd4;
  243. }
  244. /* ------------------------------------------------- */
  245. /* Animations */
  246. /* ------------------------------------------------- */
  247. a:hover {
  248. -moz-transition: all 0.2s ease-in-out;
  249. -webkit-transition: all 0.2s ease-in-out;
  250. }
  251. h1,
  252. h2,
  253. h3,
  254. h4,
  255. h5,
  256. h6,
  257. p,
  258. blockquote {
  259. -moz-transition: all 0.2s ease;
  260. -webkit-transition: all 0.2s ease;
  261. }
  262. /* ================================================ */
  263. /* 3. Media Queries */
  264. /* ================================================ */
  265. /* Base styles are for smartphones; elements are then tweaked as the viewport grows. */
  266. /* ------------------------------------------------- */
  267. /* iPad and desktop */
  268. /* ------------------------------------------------- */
  269. @media only screen and (min-width: 641px) {
  270. html {
  271. font-size: 15px;
  272. }
  273. body {
  274. /*margin: 4.8em 2.4rem 3.2rem 2.4rem !important;*/
  275. }
  276. h1 {
  277. font-size: 3.57rem; /* 53.2px @15px */
  278. line-height: 4rem; /* 60px @15px */
  279. }
  280. h2 {
  281. font-size: 2.24rem; /* 33.6px @15px */
  282. line-height: 2.8rem; /* 42px @15px */
  283. }
  284. }
  285. /* ------------------------------------------------- */
  286. /* Widescreens */
  287. /* ------------------------------------------------- */
  288. @media only screen and (min-width: 1441px) {
  289. html {
  290. font-size: 22px;
  291. }
  292. }
  293. /* ================================================ */
  294. /* 4. Print Styles */
  295. /* ================================================ */
  296. /* Inconsistent and buggy across browsers */
  297. @media print {
  298. * {
  299. background: transparent !important;
  300. color: #000 !important; /* Black text prints faster and browsers are inconsistent in color reproduction anyway: h5bp.com/s */
  301. }
  302. @page {
  303. margin: 1cm; /* Added to any #wrapper margin*/
  304. }
  305. html {
  306. font-size: 15px;
  307. }
  308. body {
  309. margin: 1rem !important; /* Security margins for browser without @page support */
  310. }
  311. #wrapper {
  312. max-width: none;
  313. }
  314. h1,
  315. h2,
  316. h3,
  317. h4,
  318. h5,
  319. h6,
  320. p {
  321. orphans: 3;
  322. widows: 3;
  323. page-break-after: avoid;
  324. }
  325. ul,
  326. ol {
  327. list-style-position: inside !important;
  328. padding-right: 0 !important;
  329. margin-left: 0 !important;
  330. }
  331. ul ul,
  332. ul ol,
  333. ol ul,
  334. ol ol,
  335. ul p:not(:first-child),
  336. ol p:not(:first-child) {
  337. margin-left: 2rem !important;
  338. }
  339. a:link,
  340. a:visited {
  341. text-decoration: underline !important;
  342. font-weight: normal !important;
  343. }
  344. a[href]:after {
  345. content: " (" attr(href) ")";
  346. }
  347. a[href^="javascript:"]:after,
  348. a[href^="#"]:after {
  349. content: ""; /* Do not show javascript and internal links */
  350. }
  351. a[href^="#"] {
  352. text-decoration: none !important;
  353. }
  354. th {
  355. background-color: rgba(0,0,0,0.2) !important;
  356. border-bottom: none !important;
  357. }
  358. tr {
  359. page-break-inside: avoid;
  360. }
  361. tbody tr:nth-child(even) {
  362. background-color: rgba(0,0,0,0.1) !important;
  363. }
  364. pre {
  365. border: 1px solid rgba(0,0,0,0.2);
  366. page-break-inside: avoid;
  367. }
  368. img {
  369. max-width: 100% !important;
  370. page-break-inside: avoid;
  371. }
  372. /* #generated-toc: added by Marked for its table of contents */
  373. #wrapper #generated-toc ul, /* Table of contents printing in Marked */
  374. #wrapper #generated-toc ol {
  375. list-style-type: decimal;
  376. }
  377. #wrapper #generated-toc ul li,
  378. #wrapper #generated-toc ol li {
  379. margin: 1rem 0;
  380. }
  381. }