No Description

_code.scss 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // Code (inline and block)
  3. // --------------------------------------------------
  4. // Inline and block code styles
  5. code,
  6. kbd,
  7. pre,
  8. samp {
  9. font-family: $font-family-monospace;
  10. }
  11. // Inline code
  12. code {
  13. padding: 2px 4px;
  14. font-size: 90%;
  15. color: $code-color;
  16. background-color: $code-bg;
  17. border-radius: $border-radius-base;
  18. }
  19. // User input typically entered via keyboard
  20. kbd {
  21. padding: 2px 4px;
  22. font-size: 90%;
  23. color: $kbd-color;
  24. background-color: $kbd-bg;
  25. border-radius: $border-radius-small;
  26. box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
  27. kbd {
  28. padding: 0;
  29. font-size: 100%;
  30. font-weight: bold;
  31. box-shadow: none;
  32. }
  33. }
  34. // Blocks of code
  35. pre {
  36. display: block;
  37. padding: (($line-height-computed - 1) / 2);
  38. margin: 0 0 ($line-height-computed / 2);
  39. font-size: ($font-size-base - 1); // 14px to 13px
  40. line-height: $line-height-base;
  41. word-break: break-all;
  42. word-wrap: break-word;
  43. color: $pre-color;
  44. background-color: $pre-bg;
  45. border: 1px solid $pre-border-color;
  46. border-radius: $border-radius-base;
  47. // Account for some code outputs that place code tags in pre tags
  48. code {
  49. padding: 0;
  50. font-size: inherit;
  51. color: inherit;
  52. white-space: pre-wrap;
  53. background-color: transparent;
  54. border-radius: 0;
  55. }
  56. }
  57. // Enable scrollable blocks of code
  58. .pre-scrollable {
  59. max-height: $pre-scrollable-max-height;
  60. overflow-y: scroll;
  61. }