_codes.scss 556 B

12345678910111213141516171819202122232425262728293031
  1. // Codes
  2. code {
  3. @include label-base();
  4. @include label-variant($code-color, lighten($code-color, 42.5%));
  5. font-size: 85%;
  6. }
  7. .code {
  8. border-radius: $border-radius;
  9. color: $body-font-color;
  10. position: relative;
  11. &::before {
  12. color: $gray-color;
  13. content: attr(data-lang);
  14. font-size: $font-size-sm;
  15. position: absolute;
  16. right: $layout-spacing;
  17. top: $unit-h;
  18. }
  19. code {
  20. background: $bg-color;
  21. color: inherit;
  22. display: block;
  23. line-height: 1.5;
  24. overflow-x: auto;
  25. padding: 1rem;
  26. width: 100%;
  27. }
  28. }