CodeBlock.module.css 663 B

123456789101112131415161718192021222324252627
  1. /* One code-block geometry for highlighted and plain arms: the shiki <pre>
  2. and the fallback <pre> draw identically except for token colors. */
  3. .block :where(pre) {
  4. margin: 0;
  5. padding: 8px 10px;
  6. border-radius: 8px;
  7. overflow-x: auto;
  8. background: var(--dsw-alias-markdown-code-block);
  9. font: var(--dsw-font-markdown-code-block);
  10. }
  11. /* Shiki inlines its theme background var; route it to the repo token. */
  12. .block :where(pre.shiki) {
  13. background: var(--dsw-alias-markdown-code-block) !important;
  14. }
  15. .block :where(pre) code {
  16. font: inherit;
  17. background: none;
  18. padding: 0;
  19. }
  20. .plain {
  21. color: var(--dsw-alias-label-primary);
  22. white-space: pre;
  23. }