styles.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. /**
  2. * @license Copyright (c) 2014-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * This file is licensed under the terms of the MIT License (see LICENSE.md).
  4. */
  5. :root {
  6. --ck-sample-base-spacing: 2em;
  7. --ck-sample-color-white: #fff;
  8. --ck-sample-color-green: #279863;
  9. --ck-sample-color-blue: #1a9aef;
  10. --ck-sample-container-width: 1285px;
  11. --ck-sample-sidebar-width: 350px;
  12. --ck-sample-editor-min-height: 400px;
  13. }
  14. /* --------- EDITOR STYLES ---------------------------------------------------------------------------------------- */
  15. .editor__editable,
  16. /* Classic build. */
  17. main .ck-editor[role='application'] .ck.ck-content,
  18. /* Decoupled document build. */
  19. .ck.editor__editable[role='textbox'],
  20. .ck.ck-editor__editable[role='textbox'],
  21. /* Inline & Balloon build. */
  22. .ck.editor[role='textbox'] {
  23. width: 100%;
  24. background: #fff;
  25. font-size: 1em;
  26. line-height: 1.6em;
  27. min-height: var(--ck-sample-editor-min-height);
  28. padding: 1.5em 2em;
  29. }
  30. .ck.ck-editor__editable {
  31. background: #fff;
  32. border: 1px solid hsl(0, 0%, 70%);
  33. width: 100%;
  34. }
  35. .ck.ck-editor {
  36. /* To enable toolbar wrapping. */
  37. width: 100%;
  38. overflow-x: hidden;
  39. }
  40. /* Because of sidebar `position: relative`, Edge is overriding the outline of a focused editor. */
  41. .ck.ck-editor__editable {
  42. position: relative;
  43. z-index: 10;
  44. }
  45. /* --------- DECOUPLED (DOCUMENT) BUILD. ---------------------------------------------*/
  46. body[data-editor='DecoupledDocumentEditor'] .document-editor__toolbar {
  47. width: 100%;
  48. }
  49. body[ data-editor='DecoupledDocumentEditor'] .collaboration-demo__editable,
  50. body[ data-editor='DecoupledDocumentEditor'] .row-editor .editor {
  51. width: 18.5cm;
  52. height: 100%;
  53. min-height: 26.25cm;
  54. padding: 1.75cm 1.5cm;
  55. margin: 2.5rem;
  56. border: 1px hsl( 0, 0%, 82.7% ) solid;
  57. background-color: var(--ck-sample-color-white);
  58. box-shadow: 0 0 5px hsla( 0, 0%, 0%, .1 );
  59. }
  60. body[ data-editor='DecoupledDocumentEditor'] .row-editor {
  61. display: flex;
  62. position: relative;
  63. justify-content: center;
  64. overflow-y: auto;
  65. background-color: #f2f2f2;
  66. border: 1px solid hsl(0, 0%, 77%);
  67. }
  68. body[data-editor='DecoupledDocumentEditor'] .sidebar {
  69. background: transparent;
  70. border: 0;
  71. box-shadow: none;
  72. }
  73. /* --------- COMMENTS & TRACK CHANGES FEATURE ---------------------------------------------------------------------- */
  74. .sidebar {
  75. padding: 0 15px;
  76. position: relative;
  77. min-width: var(--ck-sample-sidebar-width);
  78. max-width: var(--ck-sample-sidebar-width);
  79. font-size: 20px;
  80. border: 1px solid hsl(0, 0%, 77%);
  81. background: hsl(0, 0%, 98%);
  82. border-left: 0;
  83. overflow: hidden;
  84. min-height: 100%;
  85. flex-grow: 1;
  86. }
  87. /* Do not inherit styles related to the editable editor content. See line 25.*/
  88. .sidebar .ck-content[role='textbox'],
  89. .ck.ck-annotation-wrapper .ck-content[role='textbox'] {
  90. min-height: unset;
  91. width: unset;
  92. padding: 0;
  93. background: transparent;
  94. }
  95. .sidebar.narrow {
  96. min-width: 60px;
  97. flex-grow: 0;
  98. }
  99. .sidebar.hidden {
  100. display: none !important;
  101. }
  102. #sidebar-display-toggle {
  103. position: absolute;
  104. z-index: 1;
  105. width: 30px;
  106. height: 30px;
  107. text-align: center;
  108. left: 15px;
  109. top: 30px;
  110. border: 0;
  111. padding: 0;
  112. color: hsl( 0, 0%, 50% );
  113. transition: 250ms ease color;
  114. background-color: transparent;
  115. }
  116. #sidebar-display-toggle:hover {
  117. color: hsl( 0, 0%, 30% );
  118. cursor: pointer;
  119. }
  120. #sidebar-display-toggle:focus,
  121. #sidebar-display-toggle:active {
  122. outline: none;
  123. border: 1px solid #a9d29d;
  124. }
  125. #sidebar-display-toggle svg {
  126. fill: currentColor;
  127. }
  128. /* --------- COLLABORATION FEATURES (USERS) ------------------------------------------------------------------------ */
  129. .row-presence {
  130. width: 100%;
  131. border: 1px solid hsl(0, 0%, 77%);
  132. border-bottom: 0;
  133. background: hsl(0, 0%, 98%);
  134. padding: var(--ck-spacing-small);
  135. /* Make `border-bottom` as `box-shadow` to not overlap with the editor border. */
  136. box-shadow: 0 1px 0 0 hsl(0, 0%, 77%);
  137. /* Make `z-index` bigger than `.editor` to properly display tooltips. */
  138. z-index: 20;
  139. }
  140. .ck.ck-presence-list {
  141. flex: 1;
  142. padding: 1.25rem .75rem;
  143. }
  144. .presence .ck.ck-presence-list__counter {
  145. order: 2;
  146. margin-left: var(--ck-spacing-large)
  147. }
  148. /* --------- REAL TIME COLLABORATION FEATURES (SHARE TOPBAR CONTAINER) --------------------------------------------- */
  149. .collaboration-demo__row {
  150. display: flex;
  151. position: relative;
  152. justify-content: center;
  153. overflow-y: auto;
  154. background-color: #f2f2f2;
  155. border: 1px solid hsl(0, 0%, 77%);
  156. }
  157. body[ data-editor='InlineEditor'] .collaboration-demo__row {
  158. border: 0;
  159. }
  160. .collaboration-demo__container {
  161. max-width: var(--ck-sample-container-width);
  162. margin: 0 auto;
  163. padding: 1.25rem;
  164. }
  165. .presence, .collaboration-demo__row {
  166. transition: .2s opacity;
  167. }
  168. .collaboration-demo__topbar {
  169. background: #fff;
  170. border: 1px solid var(--ck-color-toolbar-border);
  171. display: flex;
  172. justify-content: space-between;
  173. align-items: center;
  174. border-bottom: 0;
  175. border-radius: 4px 4px 0 0;
  176. }
  177. .collaboration-demo__topbar .btn {
  178. margin-right: 1em;
  179. outline-offset: 2px;
  180. outline-width: 2px;
  181. background-color: var( --ck-sample-color-blue );
  182. }
  183. .collaboration-demo__topbar .btn:focus,
  184. .collaboration-demo__topbar .btn:hover {
  185. border-color: var( --ck-sample-color-blue );
  186. }
  187. .collaboration-demo__share {
  188. display: flex;
  189. align-items: center;
  190. padding: 1.25rem .75rem
  191. }
  192. .collaboration-demo__share-description p {
  193. margin: 0;
  194. font-weight: bold;
  195. font-size: 0.9em;
  196. }
  197. .collaboration-demo__share input {
  198. height: auto;
  199. font-size: 0.9em;
  200. min-width: 220px;
  201. margin: 0 10px;
  202. border-radius: 4px;
  203. border: 1px solid var(--ck-color-toolbar-border)
  204. }
  205. .collaboration-demo__share button,
  206. .collaboration-demo__share input {
  207. height: 40px;
  208. padding: 5px 10px;
  209. }
  210. .collaboration-demo__share button {
  211. position: relative;
  212. }
  213. .collaboration-demo__share button:focus {
  214. outline: none;
  215. }
  216. .collaboration-demo__share button[data-tooltip]::before,
  217. .collaboration-demo__share button[data-tooltip]::after {
  218. position: absolute;
  219. visibility: hidden;
  220. opacity: 0;
  221. pointer-events: none;
  222. transition: all .15s cubic-bezier(.5,1,.25,1);
  223. z-index: 1;
  224. }
  225. .collaboration-demo__share button[data-tooltip]::before {
  226. content: attr(data-tooltip);
  227. padding: 5px 15px;
  228. border-radius: 3px;
  229. background: #111;
  230. color: #fff;
  231. text-align: center;
  232. font-size: 11px;
  233. top: 100%;
  234. left: 50%;
  235. margin-top: 5px;
  236. transform: translateX(-50%);
  237. }
  238. .collaboration-demo__share button[data-tooltip]::after {
  239. content: '';
  240. border: 5px solid transparent;
  241. width: 0;
  242. font-size: 0;
  243. line-height: 0;
  244. top: 100%;
  245. left: 50%;
  246. transform: translateX(-50%);
  247. border-bottom: 5px solid #111;
  248. border-top: none;
  249. }
  250. .collaboration-demo__share button[data-tooltip]:hover:before,
  251. .collaboration-demo__share button[data-tooltip]:hover:after {
  252. visibility: visible;
  253. opacity: 1;
  254. }
  255. .collaboration-demo--ready {
  256. overflow: visible;
  257. height: auto;
  258. }
  259. .collaboration-demo--ready .presence,
  260. .collaboration-demo--ready .collaboration-demo__row {
  261. opacity: 1;
  262. }
  263. /* --------- SAMPLE GENERIC STYLES (not related to CKEditor) ------------------------------------------------------- */
  264. body, html {
  265. padding: 0;
  266. margin: 0;
  267. font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  268. font-size: 16px;
  269. line-height: 1.5;
  270. }
  271. body {
  272. height: 100%;
  273. color: #2D3A4A;
  274. }
  275. body * {
  276. box-sizing: border-box;
  277. }
  278. a {
  279. color: #38A5EE;
  280. }
  281. header .centered {
  282. display: flex;
  283. flex-flow: row nowrap;
  284. justify-content: space-between;
  285. align-items: center;
  286. min-height: 8em;
  287. }
  288. header h1 a {
  289. font-size: 20px;
  290. display: flex;
  291. align-items: center;
  292. color: #2D3A4A;
  293. text-decoration: none;
  294. }
  295. header h1 img {
  296. display: block;
  297. height: 64px;
  298. }
  299. header nav ul {
  300. margin: 0;
  301. padding: 0;
  302. list-style-type: none;
  303. }
  304. header nav ul li {
  305. display: inline-block;
  306. }
  307. header nav ul li + li {
  308. margin-left: 1em;
  309. }
  310. header nav ul li a {
  311. font-weight: bold;
  312. text-decoration: none;
  313. color: #2D3A4A;
  314. }
  315. header nav ul li a:hover {
  316. text-decoration: underline;
  317. }
  318. main .message {
  319. padding: 0 0 var(--ck-sample-base-spacing);
  320. background: var(--ck-sample-color-green);
  321. color: var(--ck-sample-color-white);
  322. }
  323. main .message::after {
  324. content: "";
  325. z-index: -1;
  326. display: block;
  327. height: 10em;
  328. width: 100%;
  329. background: var(--ck-sample-color-green);
  330. position: absolute;
  331. left: 0;
  332. }
  333. main .message h2 {
  334. position: relative;
  335. padding-top: 1em;
  336. font-size: 2em;
  337. }
  338. .centered {
  339. /* Hide overlapping comments. */
  340. overflow: hidden;
  341. max-width: var(--ck-sample-container-width);
  342. margin: 0 auto;
  343. padding: 0 var(--ck-sample-base-spacing);
  344. }
  345. .row {
  346. display: flex;
  347. position: relative;
  348. }
  349. .btn {
  350. cursor: pointer;
  351. padding: 8px 16px;
  352. font-size: 1rem;
  353. user-select: none;
  354. border-radius: 4px;
  355. transition: color .2s ease-in-out,background-color .2s ease-in-out,border-color .2s ease-in-out,opacity .2s ease-in-out;
  356. background-color: var(--ck-sample-color-button-blue);
  357. border-color: var(--ck-sample-color-button-blue);
  358. color: var(--ck-sample-color-white);
  359. display: inline-block;
  360. }
  361. .btn--tiny {
  362. padding: 6px 12px;
  363. font-size: .8rem;
  364. }
  365. footer {
  366. margin: calc(2*var(--ck-sample-base-spacing)) var(--ck-sample-base-spacing);
  367. font-size: .8em;
  368. text-align: center;
  369. color: rgba(0,0,0,.4);
  370. }
  371. /* --------- RWD --------------------------------------------------------------------------------------------------- */
  372. @media screen and ( max-width: 800px ) {
  373. :root {
  374. --ck-sample-base-spacing: 1em;
  375. }
  376. header h1 {
  377. width: 100%;
  378. }
  379. header h1 img {
  380. height: 40px;
  381. }
  382. header nav ul {
  383. text-align: right;
  384. }
  385. main .message h2 {
  386. font-size: 1.5em;
  387. }
  388. }