CodeBlock.module.scss 705 B

12345678910111213141516171819202122232425262728293031323334
  1. @use '~/styles/variables' as var;
  2. @use '@growi/core/scss/bootstrap/init' as bs;
  3. .code-highlighted {
  4. // for word wrapping
  5. // ref: https://qiita.com/spaceonly/items/9aa8599a082cb72740b7
  6. %breaker {
  7. word-break: break-all !important;
  8. word-wrap: break-word !important;
  9. overflow-wrap: break-word !important;
  10. white-space: break-spaces !important;
  11. line-break: anywhere !important;
  12. };
  13. @extend %breaker;
  14. code {
  15. @extend %breaker;
  16. }
  17. }
  18. .code-highlighted-title {
  19. position: absolute;
  20. top: 0;
  21. right: 0.5em;
  22. padding: 0 4px;
  23. font-style: normal;
  24. font-weight: bold;
  25. color: bs.$gray-900;
  26. background: bs.$gray-300;
  27. border-radius: bs.$border-radius;
  28. opacity: 0.8;
  29. }