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.

63 lines
1.4 KiB

10 years ago
  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. white-space: nowrap;
  18. border-radius: @border-radius-base;
  19. }
  20. // User input typically entered via keyboard
  21. kbd {
  22. padding: 2px 4px;
  23. font-size: 90%;
  24. color: @kbd-color;
  25. background-color: @kbd-bg;
  26. border-radius: @border-radius-small;
  27. box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
  28. }
  29. // Blocks of code
  30. pre {
  31. display: block;
  32. padding: ((@line-height-computed - 1) / 2);
  33. margin: 0 0 (@line-height-computed / 2);
  34. font-size: (@font-size-base - 1); // 14px to 13px
  35. line-height: @line-height-base;
  36. word-break: break-all;
  37. word-wrap: break-word;
  38. color: @pre-color;
  39. background-color: @pre-bg;
  40. border: 1px solid @pre-border-color;
  41. border-radius: @border-radius-base;
  42. // Account for some code outputs that place code tags in pre tags
  43. code {
  44. padding: 0;
  45. font-size: inherit;
  46. color: inherit;
  47. white-space: pre-wrap;
  48. background-color: transparent;
  49. border-radius: 0;
  50. }
  51. }
  52. // Enable scrollable blocks of code
  53. .pre-scrollable {
  54. max-height: @pre-scrollable-max-height;
  55. overflow-y: scroll;
  56. }