_code.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Code
  2. //
  3. // Inline and block-level code snippets. Includes tweaks to syntax highlighted
  4. // snippets from Pygments/Rouge and Gist embeds.
  5. code,
  6. pre {
  7. font-family: $code-font-family;
  8. }
  9. code {
  10. padding: .25em .5em;
  11. font-size: 85%;
  12. color: $code-color;
  13. background-color: #f9f9f9;
  14. border-radius: 3px;
  15. }
  16. pre {
  17. margin-top: 0;
  18. margin-bottom: 1rem;
  19. }
  20. pre code {
  21. padding: 0;
  22. font-size: 100%;
  23. color: inherit;
  24. background-color: transparent;
  25. }
  26. // Pygments via Jekyll
  27. .highlight {
  28. padding: 1rem;
  29. margin-bottom: 1rem;
  30. font-size: .8rem;
  31. line-height: 1.4;
  32. background-color: #f9f9f9;
  33. border-radius: .25rem;
  34. pre {
  35. margin-bottom: 0;
  36. overflow-x: auto;
  37. }
  38. .lineno {
  39. display: inline-block; // Ensures the null space also isn't selectable
  40. padding-right: .75rem;
  41. padding-left: .25rem;
  42. color: #999;
  43. // Make sure numbers aren't selectable
  44. -webkit-user-select: none;
  45. -moz-user-select: none;
  46. user-select: none;
  47. }
  48. }
  49. // Gist via GitHub Pages
  50. // .gist .gist-file {
  51. // font-family: Menlo, Monaco, "Courier New", monospace !important;
  52. // }
  53. // .gist .markdown-body {
  54. // padding: 15px;
  55. // }
  56. // .gist pre {
  57. // padding: 0;
  58. // background-color: transparent;
  59. // }
  60. // .gist .gist-file .gist-data {
  61. // font-size: .8rem !important;
  62. // line-height: 1.4;
  63. // }
  64. // .gist code {
  65. // padding: 0;
  66. // color: inherit;
  67. // background-color: transparent;
  68. // border-radius: 0;
  69. // }