@ckeditor/ckeditor5-theme-lark 42.0.2 → 43.0.0-alpha.0

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": "42.0.2",
3
+ "version": "43.0.0-alpha.0",
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": "42.0.2"
12
+ "@ckeditor/ckeditor5-ui": "43.0.0-alpha.0"
13
13
  },
14
14
  "author": "CKSource (http://cksource.com/)",
15
15
  "license": "GPL-2.0-or-later",
@@ -13,21 +13,11 @@
13
13
  .ck.ck-character-grid {
14
14
  overflow-y: auto;
15
15
  overflow-x: hidden;
16
- width: 350px;
17
- max-height: 200px;
18
-
19
- @mixin ck-media-phone {
20
- width: 190px;
21
- }
22
16
 
23
17
  & .ck-character-grid__tiles {
24
- grid-template-columns: repeat(10, 1fr);
18
+ grid-template-columns: repeat(auto-fill, minmax(var(--ck-character-grid-tile-size), 1fr));
25
19
  margin: var(--ck-spacing-standard) var(--ck-spacing-large);
26
20
  grid-gap: var(--ck-spacing-standard);
27
-
28
- @mixin ck-media-phone {
29
- grid-template-columns: repeat(5, 1fr);
30
- }
31
21
  }
32
22
 
33
23
  & .ck-character-grid__tile {
@@ -35,7 +25,7 @@
35
25
  height: var(--ck-character-grid-tile-size);
36
26
  min-width: var(--ck-character-grid-tile-size);
37
27
  min-height: var(--ck-character-grid-tile-size);
38
- font-size: 1.2em;
28
+ font-size: 1.5em;
39
29
  padding: 0;
40
30
  transition: .2s ease box-shadow;
41
31
  border: 0;
@@ -23,8 +23,4 @@
23
23
  & .ck-character-info__code {
24
24
  opacity: .6;
25
25
  }
26
-
27
- @mixin ck-media-phone {
28
- max-width: 190px;
29
- }
30
26
  }
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
+
8
+ .ck.ck-list-item-button {
9
+ &,
10
+ &.ck-on {
11
+ background: var(--ck-color-list-background);
12
+ color: var(--ck-color-text);
13
+ }
14
+
15
+ /*
16
+ * `.ck-on` class and background styling is overridden for `ck-button` in many places.
17
+ * This is a workaround to make sure that the background is not overridden and uses similar
18
+ * selector specificity as the other overrides.
19
+ */
20
+ &:hover:not(.ck-disabled),
21
+ &.ck-button.ck-on:hover,
22
+ &.ck-on:not(.ck-list-item-button_toggleable),
23
+ &.ck-on:hover {
24
+ background: var(--ck-color-list-button-hover-background);
25
+
26
+ &:not(.ck-disabled) {
27
+ color: var(--ck-color-text);
28
+ }
29
+ }
30
+ }
@@ -25,7 +25,7 @@
25
25
  cursor: default;
26
26
  min-width: 12em;
27
27
 
28
- & > .ck-button {
28
+ & > .ck-button:not(.ck-list-item-button) {
29
29
  min-height: unset;
30
30
  width: 100%;
31
31
  border-radius: 0;
@@ -43,6 +43,11 @@
43
43
  https://github.com/ckeditor/ckeditor5-heading/issues/63 */
44
44
  padding: var(--ck-list-button-padding);
45
45
 
46
+ & .ck-button__label {
47
+ /* https://github.com/ckeditor/ckeditor5-heading/issues/63 */
48
+ line-height: calc(var(--ck-line-height-base) * var(--ck-font-size-base));
49
+ }
50
+
46
51
  &:active {
47
52
  box-shadow: none;
48
53
  }
@@ -59,7 +64,7 @@
59
64
  background: var(--ck-color-list-button-on-background-focus);
60
65
  }
61
66
 
62
- &:focus:not(.ck-switchbutton):not(.ck-disabled) {
67
+ &:focus:not(.ck-disabled) {
63
68
  border-color: var(--ck-color-base-background);
64
69
  }
65
70
  }
@@ -71,7 +76,7 @@
71
76
 
72
77
  /* It's unnecessary to change the background/text of a switch toggle; it has different ways
73
78
  of conveying its state (like the switcher) */
74
- & > .ck-switchbutton {
79
+ & > .ck-button.ck-switchbutton {
75
80
  &.ck-on {
76
81
  background: var(--ck-color-list-background);
77
82
  color: inherit;
@@ -66,20 +66,6 @@
66
66
  &:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button {
67
67
  border-radius: 0;
68
68
 
69
- &:focus {
70
- border-color: transparent;
71
- box-shadow: none;
72
-
73
- &:not(.ck-on) {
74
- background: var(--ck-color-button-default-hover-background);
75
- }
76
- }
77
-
78
- /* Spacing in buttons that miss the icon. */
79
- &:not(:has(.ck-button__icon)) > .ck-button__label {
80
- margin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small));
81
- }
82
-
83
69
  & > .ck-menu-bar__menu__button__arrow {
84
70
  width: var(--ck-dropdown-arrow-size);
85
71
 
@@ -21,29 +21,6 @@
21
21
  margin-left: calc(-1 * var(--ck-spacing-small));
22
22
  margin-right: var(--ck-spacing-small);
23
23
  }
24
-
25
- /*
26
- * Hovered items automatically get focused. Default focus styles look odd
27
- * while moving across a huge list of items so let's get rid of them
28
- */
29
- &:focus {
30
- border-color: transparent;
31
- box-shadow: none;
32
-
33
- &:not(.ck-on) {
34
- background: var(--ck-color-button-default-hover-background);
35
- }
36
- }
37
- }
38
-
39
- /*
40
- * First-level sub-menu item buttons.
41
- */
42
- &.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__panel > ul > .ck-menu-bar__menu__item > .ck-menu-bar__menu__item__button {
43
- /* Spacing in buttons that miss the icon. */
44
- &:not(:has(.ck-button__icon)) > .ck-button__label {
45
- margin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small));
46
- }
47
24
  }
48
25
  }
49
26
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  @import "../../../mixins/_rounded.css";
7
7
  @import "../../../mixins/_shadow.css";
8
+ @import "../../../mixins/_focus.css";
8
9
 
9
10
  :root {
10
11
  --ck-menu-bar-menu-panel-max-width: 75vw;
@@ -45,3 +46,25 @@
45
46
  outline: none;
46
47
  }
47
48
  }
49
+
50
+ .ck.ck-menu-bar {
51
+ & .ck-list-item-button {
52
+ &:focus,
53
+ &:active {
54
+ border-color: transparent;
55
+ box-shadow: none;
56
+ }
57
+ }
58
+
59
+ &.ck-menu-bar_focus-border-enabled .ck-list-item-button {
60
+ &:focus,
61
+ &:active {
62
+ /* Fix truncated shadows due to rendering order. */
63
+ position: relative;
64
+ z-index: 2;
65
+
66
+ @mixin ck-focus-ring;
67
+ @mixin ck-box-shadow var(--ck-focus-outer-shadow);
68
+ }
69
+ }
70
+ }
package/theme/index.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import "./ckeditor5-ui/components/autocomplete/autocomplete.css";
11
11
  @import "./ckeditor5-ui/components/button/button.css";
12
12
  @import "./ckeditor5-ui/components/button/switchbutton.css";
13
+ @import "./ckeditor5-ui/components/button/listitembutton.css";
13
14
  @import "./ckeditor5-ui/components/collapsible/collapsible.css";
14
15
  @import "./ckeditor5-ui/components/colorgrid/colorgrid.css";
15
16
  @import "./ckeditor5-ui/components/colorselector/colorselector.css";