@ckeditor/ckeditor5-theme-lark 43.0.0-alpha.4 → 43.0.0-alpha.5

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": "43.0.0-alpha.4",
3
+ "version": "43.0.0-alpha.5",
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": "43.0.0-alpha.4"
12
+ "@ckeditor/ckeditor5-ui": "43.0.0-alpha.5"
13
13
  },
14
14
  "author": "CKSource (http://cksource.com/)",
15
15
  "license": "GPL-2.0-or-later",
@@ -32,7 +32,6 @@
32
32
  & > .ck.ck-button {
33
33
  display: block;
34
34
  width: 100%;
35
- padding: var(--ck-list-button-padding);
36
35
 
37
36
  @mixin ck-dir ltr {
38
37
  text-align: left;
@@ -47,7 +47,7 @@
47
47
 
48
48
  /* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */
49
49
  & .ck.ck-list {
50
- margin: var(--ck-spacing-standard) var(--ck-spacing-large);
50
+ margin: 0 var(--ck-spacing-large);
51
51
 
52
52
  & .ck-button.ck-switchbutton {
53
53
  padding: 0;
@@ -121,13 +121,11 @@ a.ck.ck-button {
121
121
  /* stylelint-disable-next-line no-descending-specificity */
122
122
  & .ck-button__icon {
123
123
  @mixin ck-dir ltr {
124
- margin-left: calc(-1 * var(--ck-spacing-small));
125
- margin-right: var(--ck-spacing-small);
124
+ margin-right: var(--ck-spacing-medium);
126
125
  }
127
126
 
128
127
  @mixin ck-dir rtl {
129
- margin-right: calc(-1 * var(--ck-spacing-small));
130
- margin-left: var(--ck-spacing-small);
128
+ margin-left: var(--ck-spacing-medium);
131
129
  }
132
130
  }
133
131
  }
@@ -5,13 +5,25 @@
5
5
 
6
6
  @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
7
 
8
- .ck.ck-list-item-button {
8
+ .ck.ck-button.ck-list-item-button {
9
+ padding: var(--ck-spacing-tiny) calc(2 * var(--ck-spacing-standard));
10
+
9
11
  &,
10
12
  &.ck-on {
11
13
  background: var(--ck-color-list-background);
12
14
  color: var(--ck-color-text);
13
15
  }
14
16
 
17
+ &:has(.ck-list-item-button__check-holder) {
18
+ @mixin ck-dir ltr {
19
+ padding-left: var(--ck-spacing-small);
20
+ }
21
+
22
+ @mixin ck-dir rtl {
23
+ padding-right: var(--ck-spacing-small);
24
+ }
25
+ }
26
+
15
27
  /*
16
28
  * `.ck-on` class and background styling is overridden for `ck-button` in many places.
17
29
  * This is a workaround to make sure that the background is not overridden and uses similar
@@ -11,7 +11,6 @@
11
11
  & > .ck.ck-button {
12
12
  width: 100%;
13
13
  font-weight: bold;
14
- padding: var(--ck-list-button-padding);
15
14
  border-radius: 0;
16
15
  color: inherit;
17
16
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  :root {
7
7
  --ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));
8
+ --ck-icon-font-size: .8333350694em;
8
9
  }
9
10
 
10
11
  .ck.ck-icon {
@@ -12,7 +13,7 @@
12
13
  height: var(--ck-icon-size);
13
14
 
14
15
  /* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */
15
- font-size: .8333350694em;
16
+ font-size: var(--ck-icon-font-size);
16
17
 
17
18
  /* Inherit cursor style (#5). */
18
19
  cursor: inherit;
@@ -8,24 +8,24 @@
8
8
  @import "../../../mixins/_shadow.css";
9
9
  @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
10
10
 
11
- :root {
12
- --ck-list-button-padding:
13
- calc(.11 * var(--ck-line-height-base) * var(--ck-font-size-base))
14
- calc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));
15
- }
16
-
17
11
  .ck.ck-list {
18
12
  @mixin ck-rounded-corners;
19
13
 
20
14
  list-style-type: none;
21
15
  background: var(--ck-color-list-background);
16
+
17
+ /* A spacing at the beginning and end of the list */
18
+ padding: var(--ck-spacing-small) 0;
22
19
  }
23
20
 
24
21
  .ck.ck-list__item {
25
22
  cursor: default;
26
- min-width: 12em;
23
+
24
+ /* Almost as wide as menu bar items. */
25
+ min-width: 15em;
27
26
 
28
27
  & > .ck-button:not(.ck-list-item-button) {
28
+ padding: var(--ck-spacing-tiny) calc(2 * var(--ck-spacing-standard));
29
29
  min-height: unset;
30
30
  width: 100%;
31
31
  border-radius: 0;
@@ -38,11 +38,6 @@
38
38
  text-align: right;
39
39
  }
40
40
 
41
- /* List items should have the same height. Use absolute units to make sure it is so
42
- because e.g. different heading styles may have different height
43
- https://github.com/ckeditor/ckeditor5-heading/issues/63 */
44
- padding: var(--ck-list-button-padding);
45
-
46
41
  & .ck-button__label {
47
42
  /* https://github.com/ckeditor/ckeditor5-heading/issues/63 */
48
43
  line-height: calc(var(--ck-line-height-base) * var(--ck-font-size-base));
@@ -92,6 +87,11 @@
92
87
  .ck-list .ck-list__group {
93
88
  padding-top: var(--ck-spacing-medium);
94
89
 
90
+ /* Lists come with an inner vertical padding. Don't duplicate it. */
91
+ &:first-child {
92
+ padding-top: 0;
93
+ }
94
+
95
95
  /* The group should have a border when it's not the first item. */
96
96
  *:not(.ck-hidden) ~ & {
97
97
  border-top: 1px solid var(--ck-color-base-border);
@@ -100,7 +100,7 @@
100
100
  & > .ck-label {
101
101
  font-size: 11px;
102
102
  font-weight: bold;
103
- padding: var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium);
103
+ padding: var(--ck-spacing-medium) var(--ck-spacing-large) 0;
104
104
  }
105
105
  }
106
106
 
@@ -108,4 +108,7 @@
108
108
  height: 1px;
109
109
  width: 100%;
110
110
  background: var(--ck-color-base-border);
111
+
112
+ /* Give the separator some air */
113
+ margin: var(--ck-spacing-small) 0;
111
114
  }
@@ -12,7 +12,6 @@
12
12
  * All menu buttons.
13
13
  */
14
14
  & > .ck-menu-bar__menu__button {
15
- padding: var(--ck-list-button-padding);
16
15
  width: 100%;
17
16
 
18
17
  & > .ck-button__label {
@@ -71,33 +70,29 @@
71
70
 
72
71
  @mixin ck-dir ltr {
73
72
  transform: rotate(-90deg);
74
- }
75
-
76
- @mixin ck-dir rtl {
77
- transform: rotate(90deg);
78
- }
79
- }
80
-
81
- &.ck-disabled > .ck-menu-bar__menu__button__arrow {
82
- @mixin ck-disabled;
83
- }
84
-
85
- @mixin ck-dir ltr {
86
- & > .ck-menu-bar__menu__button__arrow {
87
- right: var(--ck-spacing-standard);
88
73
 
89
74
  /* A space to accommodate the triangle. */
90
75
  margin-left: var(--ck-spacing-standard);
76
+
77
+ /* Nudge the arrow gently to the right because its center of gravity is to the left */
78
+ margin-right: calc(-1 * var(--ck-spacing-small));
91
79
  }
92
- }
93
80
 
94
- @mixin ck-dir rtl {
95
- & > .ck-menu-bar__menu__button__arrow {
81
+ @mixin ck-dir rtl {
82
+ transform: rotate(90deg);
83
+
96
84
  left: var(--ck-spacing-standard);
97
85
 
98
86
  /* A space to accommodate the triangle. */
99
87
  margin-right: var(--ck-spacing-small);
88
+
89
+ /* Nudge the arrow gently to the left because its center of gravity is to the right (after rotation). */
90
+ margin-left: calc(-1 * var(--ck-spacing-small));
100
91
  }
101
92
  }
93
+
94
+ &.ck-disabled > .ck-menu-bar__menu__button__arrow {
95
+ @mixin ck-disabled;
96
+ }
102
97
  }
103
98
  }
@@ -3,6 +3,8 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
7
+
6
8
  .ck.ck-menu-bar__menu {
7
9
  /*
8
10
  * List item buttons.
@@ -17,9 +19,16 @@
17
19
  }
18
20
 
19
21
  & > .ck-spinner-container {
20
- /* These margins are the same as for .ck-icon. */
21
- margin-left: calc(-1 * var(--ck-spacing-small));
22
- margin-right: var(--ck-spacing-small);
22
+ /* This ensures margins corresponding to the .ck-icon. */
23
+ font-size: var(--ck-icon-font-size);
24
+
25
+ @mixin ck-dir ltr {
26
+ margin-right: var(--ck-spacing-medium);
27
+ }
28
+
29
+ @mixin ck-dir rtl {
30
+ margin-left: var(--ck-spacing-medium);
31
+ }
23
32
  }
24
33
  }
25
34
  }