8
0

theme.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  2. // For licensing, see LICENSE.md or http://ckeditor.com/license
  3. @import '~@ckeditor/ckeditor5-theme-lark/theme/helpers/_spacing';
  4. $ck-image-spacing: 5 * ck-spacing( 'small' );
  5. $ck-image-max-width: 50%;
  6. .ck-editor__editable {
  7. .image {
  8. text-align: center;
  9. clear: both;
  10. &.image-style-side,
  11. &.image-style-align-left,
  12. &.image-style-align-center,
  13. &.image-style-align-right {
  14. max-width: $ck-image-max-width;
  15. }
  16. &.image-style-side {
  17. float: right;
  18. margin-left: $ck-image-spacing;
  19. }
  20. &.image-style-align-left {
  21. float: left;
  22. margin-right: $ck-image-spacing;
  23. }
  24. &.image-style-align-center {
  25. margin-left: auto;
  26. margin-right: auto;
  27. }
  28. &.image-style-align-right {
  29. float: right;
  30. margin-left: $ck-image-spacing;
  31. }
  32. }
  33. .image > img {
  34. // Prevent unnecessary margins caused by line-height (see #44).
  35. display: block;
  36. // Center the image if its width is smaller than content's width.
  37. margin: 0 auto;
  38. // Make sure the image never exceeds the size of the parent container (#67).
  39. max-width: 100%;
  40. }
  41. }