codeblock.css 805 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. .ck-content pre {
  6. padding: 1em;
  7. color: #353535;
  8. background: hsla(0, 0%, 78%, 0.3);
  9. border: 1px solid hsl(0, 0%, 77%);
  10. border-radius: 2px;
  11. /* Code block are language direction–agnostic. */
  12. text-align: left;
  13. direction: ltr;
  14. white-space: pre-wrap;
  15. /* Don't inherit the style, e.g. when in a block quote. */
  16. font-style: normal;
  17. /* Don't let the code be squashed e.g. when in a table cell. */
  18. min-width: 60px;
  19. & code {
  20. background: unset;
  21. padding: 0;
  22. border-radius: 0;
  23. }
  24. }
  25. .ck.ck-editor__editable pre {
  26. position: relative;
  27. &[data-language]::after {
  28. content: attr(data-language);
  29. position: absolute;
  30. }
  31. }