_code.scss 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Inline code
  2. code {
  3. font-size: $code-font-size;
  4. color: $code-color;
  5. word-break: break-word;
  6. // Streamline the style when inside anchors to avoid broken underline and more
  7. a > & {
  8. color: inherit;
  9. }
  10. }
  11. // User input typically entered via keyboard
  12. kbd {
  13. padding: $kbd-padding-y $kbd-padding-x;
  14. font-size: $kbd-font-size;
  15. color: $kbd-color;
  16. background-color: $kbd-bg;
  17. @include border-radius($border-radius-sm);
  18. @include box-shadow($kbd-box-shadow);
  19. kbd {
  20. padding: 0;
  21. font-size: 100%;
  22. font-weight: $nested-kbd-font-weight;
  23. @include box-shadow(none);
  24. }
  25. }
  26. // Blocks of code
  27. pre {
  28. display: block;
  29. font-size: $code-font-size;
  30. color: $pre-color;
  31. // Account for some code outputs that place code tags in pre tags
  32. code {
  33. font-size: inherit;
  34. color: inherit;
  35. word-break: normal;
  36. }
  37. }
  38. // Enable scrollable blocks of code
  39. .pre-scrollable {
  40. max-height: $pre-scrollable-max-height;
  41. overflow-y: scroll;
  42. }