code.less 981 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 6px;
  14. font-size: 85%;
  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 6px;
  22. font-size: 85%;
  23. color: @kbd-color;
  24. background-color: @kbd-bg;
  25. border-radius: @border-radius-base;
  26. box-shadow: none;
  27. }
  28. // Blocks of code
  29. pre {
  30. padding: ((@line-height-computed - 6) / 3);
  31. margin: 0 0 (@line-height-computed / 2);
  32. font-size: (@font-size-base - 5); // 18px to 13px
  33. line-height: @line-height-base;
  34. color: @pre-color;
  35. background-color: @pre-bg;
  36. border: 2px solid @pre-border-color;
  37. border-radius: @pre-border-radius;
  38. white-space: pre;
  39. }
  40. // Enable scrollable blocks of code
  41. .pre-scrollable {
  42. max-height: @pre-scrollable-max-height;
  43. }