@ckeditor/ckeditor5-theme-lark 44.3.0 → 45.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-theme-lark",
3
- "version": "44.3.0",
3
+ "version": "45.0.0-alpha.1",
4
4
  "description": "A bright theme for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -9,7 +9,7 @@
9
9
  "ckeditor5-theme"
10
10
  ],
11
11
  "dependencies": {
12
- "@ckeditor/ckeditor5-ui": "44.3.0"
12
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.1"
13
13
  },
14
14
  "author": "CKSource (http://cksource.com/)",
15
15
  "license": "SEE LICENSE IN LICENSE.md",
@@ -3,6 +3,54 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
 
6
+ :root {
7
+ --ck-bookmark-icon-hover-fill-color: var(--ck-color-widget-hover-border);
8
+ --ck-bookmark-icon-selected-fill-color: var(--ck-color-focus-border);
9
+ --ck-bookmark-icon-animation-duration: var(--ck-widget-handler-animation-duration);
10
+ --ck-bookmark-icon-animation-curve: var(--ck-widget-handler-animation-curve);
11
+ }
12
+
13
+ .ck .ck-bookmark {
14
+ &.ck-widget {
15
+ display: inline-block;
16
+ outline: none;
17
+
18
+ & .ck-bookmark__icon .ck-icon__fill {
19
+ transition: fill var(--ck-bookmark-icon-animation-duration) var(--ck-bookmark-icon-animation-curve);
20
+ }
21
+
22
+ &:hover {
23
+ & .ck-bookmark__icon .ck-icon__fill {
24
+ fill: var(--ck-bookmark-icon-hover-fill-color);
25
+ }
26
+ }
27
+
28
+ &.ck-widget_selected {
29
+ .ck-bookmark__icon .ck-icon__fill {
30
+ fill: var(--ck-bookmark-icon-selected-fill-color);
31
+ }
32
+ }
33
+
34
+ &.ck-widget_selected,
35
+ &.ck-widget_selected:hover {
36
+ outline: none;
37
+ }
38
+
39
+ & .ck-bookmark__icon {
40
+ position: relative;
41
+ display: block;
42
+ /* To make it align with text baseline. */
43
+ top: -0.1em;
44
+
45
+ & .ck-icon {
46
+ height: 1.2em;
47
+ width: auto;
48
+ vertical-align: middle;
49
+ }
50
+ }
51
+ }
52
+ }
53
+
6
54
  /*
7
55
  * Classes used by the "fake visual selection" displayed in the content when an input
8
56
  * in the bookmark UI has focus (the browser does not render the native selection in this state).
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
7
+
8
+ :root {
9
+ --ck-bookmark-form-width: 340px;
10
+ }
11
+
12
+ @mixin ck-media-phone {
13
+ :root {
14
+ --ck-bookmark-form-width: 300px;
15
+ }
16
+ }
17
+
18
+ .ck.ck-bookmark-form {
19
+ width: var(--ck-bookmark-form-width);
20
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";
7
+
8
+ .ck.ck-bookmark-balloon {
9
+ & .ck.ck-toolbar {
10
+ & > .ck-toolbar__items {
11
+ flex-wrap: nowrap;
12
+ }
13
+ }
14
+ }
15
+
16
+ .ck.ck-bookmark-toolbar__preview {
17
+ padding: 0 var(--ck-spacing-medium);
18
+ max-width: var(--ck-input-width);
19
+ min-width: 3em;
20
+ font-weight: normal;
21
+ text-overflow: ellipsis;
22
+ text-align: center;
23
+ overflow: hidden;
24
+
25
+ @mixin ck-unselectable;
26
+ cursor: default;
27
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
7
+
8
+ :root {
9
+ --ck-image-custom-resize-form-width: 340px;
10
+ }
11
+
12
+ @mixin ck-media-phone {
13
+ :root {
14
+ --ck-image-custom-resize-form-width: 300px;
15
+ }
16
+ }
17
+
18
+ .ck.ck-image-custom-resize-form {
19
+ &.ck-responsive-form {
20
+ width: var(--ck-image-custom-resize-form-width);
21
+ }
22
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
7
+
8
+ :root {
9
+ --ck-text-alternative-form-width: 340px;
10
+ }
11
+
12
+ @mixin ck-media-phone {
13
+ :root {
14
+ --ck-text-alternative-form-width: 300px;
15
+ }
16
+ }
17
+
18
+ .ck.ck-text-alternative-form {
19
+ &.ck-responsive-form {
20
+ width: var(--ck-text-alternative-form-width);
21
+ }
22
+ }
@@ -4,57 +4,54 @@
4
4
  */
5
5
 
6
6
  @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
8
+
9
+ :root {
10
+ --ck-link-panel-width: 340px;
11
+ /* The height of the text inside the link providers list button. */
12
+ --ck-link-provider-list-item-text-height: calc(var(--ck-line-height-base) * var(--ck-font-size-base));
13
+ /* The height of the link providers list item contained paddings. */
14
+ --ck-link-provider-list-item-height: calc(var(--ck-link-provider-list-item-text-height) + var(--ck-spacing-small) + var(--ck-spacing-small));
15
+ }
7
16
 
8
- /*
9
- * Style link form differently when manual decorators are available.
10
- * See: https://github.com/ckeditor/ckeditor5-link/issues/186.
11
- */
12
- .ck.ck-link-form_layout-vertical {
13
- padding: 0;
14
- min-width: var(--ck-input-width);
15
-
16
- & .ck-labeled-field-view {
17
- margin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);
18
-
19
- & .ck-input-text {
20
- min-width: 0;
21
- width: 100%;
22
- }
17
+ @mixin ck-media-phone {
18
+ :root {
19
+ --ck-link-panel-width: 300px;
23
20
  }
21
+ }
24
22
 
25
- & > .ck-button {
26
- padding: var(--ck-spacing-standard);
27
- margin: 0;
28
- width: 50%;
29
- border-radius: 0;
30
-
31
- &:not(:focus) {
32
- border-top: 1px solid var(--ck-color-base-border);
33
- }
34
-
35
- @mixin ck-dir ltr {
36
- margin-left: 0;
37
- }
38
-
39
- @mixin ck-dir rtl {
40
- margin-left: 0;
23
+ /* Generic class that wraps each link balloon view. */
24
+ .ck.ck-form.ck-link-form {
25
+ width: var(--ck-link-panel-width);
26
+ padding-bottom: 0;
41
27
 
42
- &:last-of-type {
43
- border-right: 1px solid var(--ck-color-base-border);
28
+ &.ck-responsive-form {
29
+ & .ck-labeled-field-view {
30
+ @mixin ck-media-phone {
31
+ margin: 0;
44
32
  }
45
33
  }
46
34
  }
47
35
 
48
- /* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */
49
- & .ck.ck-list {
50
- margin: 0 var(--ck-spacing-large);
36
+ & .ck-link-form__providers-list {
37
+ border-top: 1px solid var(--ck-color-base-border);
38
+
39
+ /* The list should be scrollable when there are more than 4 items. */
40
+ &:has(.ck-list__item:nth-child(n + 5)) {
41
+ overflow: auto;
42
+ /* Scroll should appear when there are more than 5 item on the list.
43
+ * var(--ck-spacing-large) - is a form padding.
44
+ * 1px - is a border width. */
45
+ max-height: calc(var(--ck-link-provider-list-item-height) * 4 + var(--ck-spacing-large) + 1px);
46
+ }
51
47
 
52
- & .ck-button.ck-switchbutton {
53
- padding: 0;
54
- width: 100%;
48
+ & .ck-link__button {
49
+ padding: var(--ck-spacing-small) var(--ck-spacing-large);
50
+ border-radius: 0;
55
51
 
56
- &:hover {
57
- background: none;
52
+ & > .ck-button__label {
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
58
55
  }
59
56
  }
60
57
  }
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
7
+
8
+ :root {
9
+ --ck-link-properties-width: 340px;
10
+ }
11
+
12
+ @mixin ck-media-phone {
13
+ :root {
14
+ --ck-link-properties-width: 300px;
15
+ }
16
+ }
17
+
18
+ .ck.ck-link-properties {
19
+ width: var(--ck-link-properties-width);
20
+ }
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
7
+
8
+ :root {
9
+ --ck-link-providers-width: 340px;
10
+ --ck-link-list-view-max-height: 240px;
11
+ --ck-link-list-view-icon-size: calc( var(--ck-icon-size) * 0.8); /* 0.8 = 16/20 cause default the icon size is 20px */
12
+ }
13
+
14
+ @mixin ck-media-phone {
15
+ :root {
16
+ --ck-link-providers-width: 300px;
17
+ }
18
+ }
19
+
20
+ .ck.ck-link-providers {
21
+ width: var(--ck-link-providers-width);
22
+
23
+ & .ck-form__header__label {
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ }
27
+
28
+ & > .ck-link-providers__list {
29
+ max-height: min( var(--ck-link-list-view-max-height), 40vh );
30
+
31
+ & .ck-button {
32
+ & > .ck-icon {
33
+ width: var(--ck-link-list-view-icon-size);
34
+ height: var(--ck-link-list-view-icon-size);
35
+ }
36
+
37
+ & > .ck-button__label {
38
+ overflow: hidden;
39
+ text-overflow: ellipsis;
40
+ white-space: nowrap;
41
+ }
42
+ }
43
+ }
44
+
45
+ & .ck-link__empty-list-info {
46
+ padding: calc( 2 * var(--ck-spacing-large) ) var(--ck-spacing-medium);
47
+ text-align: center;
48
+ font-style: italic;
49
+ }
50
+ }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
+
8
+ :root {
9
+ --ck-link-bookmark-icon-size: calc( var(--ck-icon-size) * 0.7); /* 0.7 = 14/20 cause default the icon size is 20px */
10
+ }
11
+
12
+ .ck.ck-toolbar.ck-link-toolbar {
13
+ & > .ck-toolbar__items {
14
+ flex-wrap: nowrap;
15
+ }
16
+ }
17
+
18
+ a.ck.ck-button.ck-link-toolbar__preview {
19
+ padding: 0 var(--ck-spacing-medium);
20
+ color: var(--ck-color-link-default);
21
+ cursor: pointer;
22
+ justify-content: center;
23
+
24
+ & .ck.ck-button__label {
25
+ text-overflow: ellipsis;
26
+
27
+ /* Match the box model of the link editor form's input so the balloon
28
+ does not change width when moving between actions and the form. */
29
+ max-width: var(--ck-input-width);
30
+ }
31
+
32
+ &,
33
+ &:hover,
34
+ &:focus,
35
+ &:active {
36
+ background: none;
37
+ }
38
+
39
+ &:active {
40
+ box-shadow: none;
41
+ }
42
+
43
+ &:hover,
44
+ &:focus {
45
+ text-decoration: underline;
46
+ }
47
+
48
+ &.ck-button_with-text .ck.ck-icon.ck-button__icon {
49
+ width: var(--ck-link-bookmark-icon-size);
50
+ height: var(--ck-link-bookmark-icon-size);
51
+
52
+ @mixin ck-dir ltr {
53
+ margin-right: var(--ck-spacing-tiny);
54
+ margin-left: var(--ck-spacing-small);
55
+ }
56
+
57
+ @mixin ck-dir rtl {
58
+ margin-left: var(--ck-spacing-tiny);
59
+ margin-right: var(--ck-spacing-small);
60
+ }
61
+ }
62
+
63
+ &:has( .ck-icon ) {
64
+ padding-left: var(--ck-spacing-extra-tiny );
65
+ }
66
+ }
@@ -6,18 +6,10 @@
6
6
  @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
7
 
8
8
  .ck.ck-form__row {
9
- padding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;
10
-
11
9
  /* Ignore labels that work as fieldset legends */
12
10
  & > *:not(.ck-label) {
13
11
  & + * {
14
- @mixin ck-dir ltr {
15
- margin-left: var(--ck-spacing-large);
16
- }
17
-
18
- @mixin ck-dir rtl {
19
- margin-right: var(--ck-spacing-large);
20
- }
12
+ margin-inline-start: var(--ck-spacing-large);
21
13
  }
22
14
  }
23
15
 
@@ -0,0 +1,155 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+
6
+ :root {
7
+ --ck-table-layout-widget-type-around-button-size: 16px;
8
+ --ck-table-layout-widget-type-around-icon-width: 10px;
9
+ --ck-table-layout-widget-type-around-icon-height: 8px;
10
+ --ck-table-layout-widget-handler-icon-size: 10px;
11
+ --ck-table-layout-default-border-color: hsl(0, 0%, 83%);
12
+
13
+ }
14
+
15
+ .ck-editor__editable {
16
+ & .table.layout-table {
17
+ & > table {
18
+ width: 100%;
19
+ height: 100%;
20
+
21
+ /* Styles to make the layout table outline visible when the layout table is inside another layout table inside edge cells.
22
+ Currently, this solution works on every browser except Safari. */
23
+ overflow: clip;
24
+ overflow-clip-margin: var(--ck-widget-outline-thickness);
25
+
26
+ /* The default table layout style in the editing view when the border is unset. */
27
+ &:not(
28
+ [style*="border:"],
29
+ [style*="border-top"],
30
+ [style*="border-bottom"],
31
+ [style*="border-left"],
32
+ [style*="border-right"],
33
+ [style*="border-width"],
34
+ [style*="border-style"],
35
+ [style*="border-color"]) {
36
+ border-color: transparent;
37
+ border-width: 0;
38
+ outline: none;
39
+ }
40
+ }
41
+
42
+ & > table > tbody > tr > td {
43
+ box-shadow: revert;
44
+ padding: revert;
45
+ min-width: 2em;
46
+ /* To make the caret visible. */
47
+ text-indent: 1px;
48
+
49
+ /* Resets the `min-width` style attribute that was added by the content table style. */
50
+ &[style^="width:"],
51
+ &[style*=" width:"],
52
+ &[style*=";width:"],
53
+ &[style*="'width:"] {
54
+ min-width: auto;
55
+ }
56
+
57
+ /* Remove the default background color from the focused table cell. */
58
+ &:focus {
59
+ background-color: transparent;
60
+ }
61
+
62
+ /* The default table layout cell style in the editing view when the border is unset.
63
+ But it need to be more strict cause of style attributes like `border-collapse`, `border-spacing`, etc. */
64
+ &:not(
65
+ [style*="border:"],
66
+ [style*="border-top"],
67
+ [style*="border-bottom"],
68
+ [style*="border-left"],
69
+ [style*="border-right"],
70
+ [style*="border-width"],
71
+ [style*="border-style"],
72
+ [style*="border-color"]) {
73
+ border-color: transparent;
74
+ /* Resetting `border-width` property to the user agent styles. */
75
+ border-width: 0;
76
+ outline: var(--ck-table-layout-default-border-color) 1px dashed;
77
+ outline-offset: -1px;
78
+
79
+ &:focus {
80
+ outline: var(--ck-color-focus-border) 1px solid;
81
+ }
82
+ }
83
+
84
+ /* Reset the `width` and `text-indent` of the bogus paragraph because <td> has 1px text indent. */
85
+ & > .ck-table-bogus-paragraph {
86
+ width: calc(100% - 1px);
87
+ text-indent: 0;
88
+ }
89
+ }
90
+
91
+ /* Widget type around overrides. */
92
+ &.ck-widget {
93
+ & > .ck-widget__type-around {
94
+ --ck-widget-type-around-button-size: var(--ck-table-layout-widget-type-around-button-size);
95
+
96
+ & > .ck-widget__type-around__button {
97
+ &.ck-widget__type-around__button_before,
98
+ &.ck-widget__type-around__button_after {
99
+ transform: translateY(0);
100
+ }
101
+
102
+ &.ck-widget__type-around__button_before {
103
+ margin-left: var(--ck-table-layout-widget-type-around-button-size);
104
+ left: min(10%, 30px);
105
+ border-radius: 0 0 100px 100px;
106
+
107
+ &::after {
108
+ border-radius: 0 0 100px 100px;
109
+ }
110
+ }
111
+
112
+ &.ck-widget__type-around__button_after {
113
+ border-radius: 100px 100px 0 0;
114
+
115
+ &::after {
116
+ border-radius: 100px 100px 0 0;
117
+ }
118
+ }
119
+
120
+ & svg {
121
+ width: var(--ck-table-layout-widget-type-around-icon-width);
122
+ height: var(--ck-table-layout-widget-type-around-icon-height);
123
+ }
124
+ }
125
+ }
126
+
127
+ &.ck-widget_with-selection-handle {
128
+ & > .ck-widget__selection-handle {
129
+ --ck-widget-handler-icon-size: var(--ck-table-layout-widget-handler-icon-size);
130
+
131
+ transform: translateY(calc(0px - var(--ck-widget-outline-thickness)));
132
+ z-index: var(--ck-z-default);
133
+ }
134
+ }
135
+
136
+ /* Show fake caret on border not above. */
137
+ &.ck-widget_type-around_show-fake-caret_before {
138
+ & > .ck-widget__type-around {
139
+ & > .ck-widget__type-around__fake-caret {
140
+ top: 0;
141
+ }
142
+ }
143
+ }
144
+
145
+ /* Show fake caret on border not below. */
146
+ &.ck-widget_type-around_show-fake-caret_after {
147
+ & > .ck-widget__type-around {
148
+ & > .ck-widget__type-around__fake-caret {
149
+ bottom: 0;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
@@ -0,0 +1,4 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
@@ -29,4 +29,18 @@
29
29
  --ck-font-size-base: 15px;
30
30
  font-weight: bold;
31
31
  }
32
+
33
+ /* Padding when back button is hidden */
34
+ &:has(.ck-button-back.ck-hidden) {
35
+ padding-inline: var(--ck-spacing-large) var(--ck-spacing-large);
36
+ }
37
+
38
+ /* Padding when back button is visible */
39
+ &:has(.ck-button-back:not(.ck-hidden)) {
40
+ padding-inline: var(--ck-spacing-small) var(--ck-spacing-small);
41
+ }
42
+
43
+ & > .ck-button-back {
44
+ margin-inline-end: var(--ck-spacing-small);
45
+ }
32
46
  }
@@ -124,4 +124,8 @@
124
124
  &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {
125
125
  max-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));
126
126
  }
127
+
128
+ &.ck-labeled-field-view_full-width {
129
+ flex-grow: 1;
130
+ }
127
131
  }
@@ -37,6 +37,13 @@
37
37
  &:hover {
38
38
  outline-color: var(--ck-color-widget-hover-border);
39
39
  }
40
+
41
+ /*
42
+ * Hide the outline of all widget parents when the widget is being hovered.
43
+ */
44
+ &:has( .ck-widget:hover ) {
45
+ outline-color: transparent;
46
+ }
40
47
  }
41
48
 
42
49
  .ck .ck-editor__nested-editable {
@@ -136,6 +143,12 @@
136
143
  }
137
144
  }
138
145
  }
146
+
147
+ /* Hide the selection handle on mouse hover over the widget of all the widget parents. */
148
+ &:has( .ck-widget:hover ) > .ck-widget__selection-handle {
149
+ opacity: 0;
150
+ visibility: hidden;
151
+ }
139
152
  }
140
153
 
141
154
  /* In a RTL environment, align the selection handler to the right side of the widget */