htmlembed.css 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. :root {
  6. --ck-html-embed-content-width: calc(100% - 1.5 * var(--ck-icon-size));
  7. --ck-html-embed-source-height: 10em;
  8. --ck-html-embed-content-min-height: calc(var(--ck-icon-size) + var(--ck-spacing-standard));
  9. }
  10. /* The feature container. */
  11. .ck-widget.raw-html-embed {
  12. font-size: var(--ck-font-size-base);
  13. background-color: var(--ck-color-base-foreground);
  14. & .raw-html-embed__content-wrapper {
  15. padding: var(--ck-spacing-standard);
  16. }
  17. /* The switch mode button wrapper. */
  18. & .raw-html-embed__buttons-wrapper {
  19. top: var(--ck-spacing-standard);
  20. right: var(--ck-spacing-standard);
  21. & .ck-button.raw-html-embed__save-button {
  22. color: var(--ck-color-button-save);
  23. }
  24. & .ck-button.raw-html-embed__cancel-button {
  25. color: var(--ck-color-button-cancel);
  26. }
  27. & .ck-button:not(:first-child) {
  28. margin-top: var(--ck-spacing-small);
  29. }
  30. }
  31. /* The edit source element. */
  32. & .raw-html-embed__source {
  33. box-sizing: border-box;
  34. height: var(--ck-html-embed-source-height);
  35. width: var(--ck-html-embed-content-width);
  36. resize: none;
  37. min-width: 0;
  38. padding: var(--ck-spacing-standard);
  39. font-family: monospace;
  40. tab-size: 4;
  41. white-space: pre-wrap;
  42. font-size: var(--ck-font-size-base); /* Safari needs this. */
  43. &[disabled] {
  44. background: hsl(0deg 0% 97%);
  45. color: hsl(0deg 0% 56%);
  46. }
  47. }
  48. /* The preview data container. */
  49. & .raw-html-embed__preview {
  50. overflow: hidden;
  51. box-sizing: border-box;
  52. width: var(--ck-html-embed-content-width);
  53. min-height: var(--ck-html-embed-content-min-height);
  54. text-align: center;
  55. & > table {
  56. margin-left: auto;
  57. margin-right: auto;
  58. }
  59. /* Disable all mouse interaction as long as the editor is not read–only. */
  60. @nest .ck-editor__editable:not(.ck-read-only) & {
  61. pointer-events: none;
  62. }
  63. }
  64. }