snippet-styles.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /*
  2. * Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. */
  4. :root {
  5. /* This custom property is read by the JS and passed to editor configurations
  6. as config.toolbar.viewportTopOffset. */
  7. --ck-snippet-viewport-top-offset: 100
  8. }
  9. @media (max-width: 960px) {
  10. :root {
  11. /* The mobile layout of Umberto is different and the toolbar offset must be
  12. smaller (https://github.com/ckeditor/ckeditor5/issues/1348). */
  13. --ck-snippet-viewport-top-offset: 55;
  14. }
  15. }
  16. .ck.ck-editor {
  17. margin: 1.5em 0;
  18. }
  19. .ck.ck-content {
  20. padding: 1em;
  21. }
  22. .ck.ck-content > :first-child {
  23. margin-top: 0;
  24. }
  25. .ck.ck-content > :last-child {
  26. margin-bottom: 0;
  27. }
  28. /* Override default Umberto's styles because they apply margins to media embed widgets with iframe
  29. previews breaking their structure. */
  30. .ck.ck-content iframe {
  31. margin: initial;
  32. }
  33. /* Reset h1's styling – https://github.com/ckeditor/ckeditor5-heading/issues/86 */
  34. .ck.ck-content h1 {
  35. display: block;
  36. margin-bottom: .5em;
  37. }
  38. /* By default Umberto uses a trick with non breaking spaces around <code> to fix space rendering.
  39. It breaks CKEditor 5 (see how <p><code>[]</code></p> looks). */
  40. .ck.ck-content code:before,
  41. .ck.ck-content code:after {
  42. content: '' !important;
  43. letter-spacing: 0 !important;
  44. display: none !important; /* Firefox is very stubborn. */
  45. }
  46. /* Restore default browser styles for <sub> and <sup>. */
  47. .ck.ck-content sub {
  48. vertical-align: sub;
  49. font-size: smaller;
  50. }
  51. .ck.ck-content sup {
  52. vertical-align: super;
  53. font-size: smaller;
  54. }
  55. .ck.ck-list {
  56. /* See https://github.com/ckeditor/ckeditor5/issues/494 */
  57. margin-left: 0;
  58. }
  59. /* examples/builds/inline-editor.html */
  60. .live-snippet .image-style-left, .live-snippet .image-style-right {
  61. float: left;
  62. height: auto;
  63. width: 50%;
  64. margin-top: .5rem;
  65. margin-right: 2.5rem;
  66. }
  67. .live-snippet .image-style-right {
  68. float: right;
  69. margin-right: 0;
  70. margin-left: 2.5rem;
  71. }
  72. .live-snippet .image img {
  73. margin: 0 auto;
  74. }
  75. .live-snippet blockquote p:first-of-type {
  76. margin-bottom: 1.5rem;
  77. }
  78. /* https://github.com/ckeditor/ckeditor5/issues/896 */
  79. .live-snippet .ck.ck-content h2,
  80. .live-snippet .ck.ck-content h3,
  81. .live-snippet .ck.ck-content h4 {
  82. position: static;
  83. }
  84. /* https://github.com/ckeditor/ckeditor5/issues/899 */
  85. .live-snippet .ck-dropdown .ck.ck-list {
  86. margin: 0;
  87. padding: 0;
  88. }
  89. /* https://github.com/ckeditor/ckeditor5/pull/1060 */
  90. .live-snippet .ck.ck-content .table table {
  91. margin: 0;
  92. display: table;
  93. }
  94. /* https://github.com/ckeditor/ckeditor5/issues/1282 */
  95. .live-snippet .ck.ck-content .table p:first-child {
  96. padding-top: 0;
  97. }
  98. /* https://github.com/ckeditor/ckeditor5/issues/1282 */
  99. .live-snippet .ck.ck-content .table p:last-child,
  100. .live-snippet .ck.ck-content .table ul:last-child,
  101. .live-snippet .ck.ck-content .table ol:last-child {
  102. margin-bottom: 0;
  103. }
  104. #snippet-inline-editor .ck-content {
  105. margin-bottom: 1rem;
  106. padding: 2rem;
  107. }
  108. #snippet-inline-editor .ck-content:not(.ck-focused) {
  109. border: 1px solid rgba(0, 0, 0, 0.15);
  110. }
  111. #snippet-inline-editor h2, #snippet-inline-editor h3 {
  112. margin-top: 0;
  113. padding-top: 0;
  114. border-bottom: 0;
  115. }
  116. #snippet-inline-editor header.ck-content {
  117. text-align: center;
  118. }
  119. #snippet-inline-editor header.ck-content h2 {
  120. margin-bottom: 0;
  121. font-size: 2.1rem;
  122. }
  123. #snippet-inline-editor header.ck-content h3 {
  124. color: rgba(5, 22, 42, 0.59);
  125. font-weight: 600;
  126. font-size: 1.6rem;
  127. }
  128. /* examples/builds/document-editor.html */
  129. .live-snippet .document-editor {
  130. margin: 1.5em 0;
  131. }
  132. .demo-row {
  133. width: 100%;
  134. display: -ms-flexbox;
  135. display: flex;
  136. }
  137. .demo-row__half {
  138. width: 50%;
  139. }
  140. .demo-row__half:first-of-type {
  141. padding-right: .5rem;
  142. }
  143. .demo-row__half:last-of-type {
  144. padding-left: .5rem;
  145. }
  146. .demo-row__third {
  147. width: 33.3333%;
  148. }
  149. .demo-row__third > div {
  150. padding: 2.5rem;
  151. border: 1px solid rgba(0, 0, 0, 0.15);
  152. }
  153. .demo-row__third:nth-of-type(2) {
  154. padding-left: 1rem;
  155. padding-right: 1rem;
  156. }
  157. .demo-row h3 {
  158. margin: 0;
  159. }
  160. .demo-row p {
  161. margin-bottom: 0;
  162. }