-
Notifications
You must be signed in to change notification settings - Fork 67
/
demo.css
174 lines (154 loc) · 4.8 KB
/
demo.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/* ---- Customizations to the color grid palettes (font and background color) ------------------------------------------------------ */
.ck.ck-color-ui-dropdown {
--ck-color-grid-tile-size: 20px;
}
.ck.ck-color-ui-dropdown .ck-color-grid {
grid-gap: 1px;
}
.ck.ck-color-ui-dropdown .ck-color-grid .ck-button {
border-radius: 0;
}
.ck.ck-color-ui-dropdown .ck-color-grid__tile:hover:not(.ck-disabled),
.ck.ck-color-ui-dropdown .ck-color-grid__tile:focus:not(.ck-disabled) {
z-index: 1;
transform: scale(1.3);
}
/* ---- Basic CSS reset ------------------------------------------------------ */
*, ::after, ::before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
}
body,
html {
margin: 0;
padding: 0;
}
.ck.ck-content.ck-editor__editable_inline > :first-child {
margin-top: 0;
}
/* ---- Styles of the demo page ------------------------------------------------------ */
.editor-wrapper {
max-width: 66rem;
margin: 0 auto 2rem auto;
}
.header-wrapper {
padding: 1rem 2rem;
}
/* ---- Document editor demo styles ------------------------------------------------------------------- */
#cke5-productivity-pack-demo {
position: relative;
border: 1px solid var(--ck-color-base-border);
border-radius: var(--ck-border-radius);
/* Set vertical boundaries for the document editor. */
max-height: 80vh;
/* This element is a flex container for easier rendering. */
display: flex;
flex-flow: column nowrap;
}
.cke5-productivity-pack-demo__toolbar-container {
/* Make sure the toolbar container is always above the editable. */
z-index: 2;
/* Create the illusion of the toolbar floating over the editable. */
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.08);
/* Use the CKEditor CSS variables to keep the UI consistent. */
border-bottom: 1px solid var(--ck-color-toolbar-border);
position: sticky;
top: var(--header-height);
}
/* Adjust the look of the toolbar inside of the container. */
.cke5-productivity-pack-demo__toolbar-container .ck-toolbar {
border: 0;
border-radius: 0;
}
/* Make the editable container look like the inside of a native word processor app. */
.cke5-productivity-pack-demo__content-container {
padding: clamp(1rem, 0.85rem + 0.74vw, 1.5rem);
background: var(--color-shark-4, #e3e8ed);
/* Make it possible to scroll the "page" of the edited content. */
overflow-y: scroll;
}
.cke5-productivity-pack-demo__content-container .cke5-productivity-pack-demo__content {
/* Set the dimensions of the "page". */
max-width: 21cm;
width: 100%;
min-height: 21cm;
/* Keep the "page" off the boundaries of the container. */
padding: 1.2cm 1cm;
border-color: transparent;
border-radius: var(--ck-border-radius);
background: white;
/* The "page" should cast a slight shadow (3D illusion). */
box-shadow: 0 0 5px rgba(0, 0, 0, 0.07);
/* Center the "page". */
margin: 0 auto;
}
.cke5-productivity-pack-demo__content-container .cke5-productivity-pack-demo__content.ck-focused {
border: var(--ck-focus-ring);
}
@media screen and (max-width: 1100px) {
.cke5-productivity-pack-demo__content-container .cke5-productivity-pack-demo__content {
padding: 0.5cm;
}
}
@media screen and (max-width: 1100px) {
#cke5-productivity-pack-demo {
grid-template-columns: 1fr;
}
}
#cke5-productivity-pack-demo {
display: grid;
grid-template-columns: 1fr minmax(75%, 22cm);
grid-template-rows: auto 1fr;
}
.cke5-productivity-pack-demo__toolbar-container .ck.ck-toolbar__items {
border: 0;
}
.cke5-productivity-pack-demo__toolbar-container {
grid-column: 1/3;
}
.cke5-productivity-pack-demo__content-container {
grid-column: 2/3;
}
@media screen and (max-width: 1100px) {
.cke5-productivity-pack-demo__content-container {
grid-column: 1/3;
}
.cke5-productivity-pack-demo__outline {
display: none;
}
.cke5-productivity-pack-demo__outline [class*=-toggle] {
opacity: 0.5;
padding: var(--ck-spacing-small);
}
.cke5-productivity-pack-demo__outline [class*=-toggle]:hover {
opacity: 1;
}
}
.cke5-productivity-pack-demo__outline {
background: var(--color-shark-4, #e3e8ed);
max-height: 80vh;
}
#cke5-productivity-pack-demo {
--ck-document-outline-indent-level-2: 1.1em;
--ck-document-outline-indent-level-3: 2.2em;
--ck-document-outline-item-active-color: var(--color-tang-5, #743ccd);
}
#cke5-productivity-pack-demo .ck-document-outline__item {
line-height: 1.1em;
max-width: 27ch;
}
#cke5-productivity-pack-demo .ck-content .ck-widget.table-of-contents ol {
margin-bottom: var(--ck-spacing-tiny);
}
@media screen and (min-width: 1100px) {
#cke5-productivity-pack-demo.outline-collapsed {
grid-template-columns: 35px minmax(22cm, 100%);
}
.cke5-productivity-pack-demo__wrappper.outline-collapsed .ck-document-outline {
display: none;
}
}
.cke5-productivity-pack-demo__wrappper {
grid-template-columns: 1fr minmax(75%, 22cm);
}