@ckeditor/ckeditor5-theme-lark 41.4.0-alpha.0 → 41.4.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": "41.4.0-alpha.0",
3
+ "version": "41.4.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": "41.4.0-alpha.0"
12
+ "@ckeditor/ckeditor5-ui": "41.4.1"
13
13
  },
14
14
  "author": "CKSource (http://cksource.com/)",
15
15
  "license": "GPL-2.0-or-later",
@@ -3,10 +3,37 @@
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/_mediacolors.css";
7
+
6
8
  /* See ckeditor/ckeditor5#936. */
7
9
  .ck.ck-placeholder, .ck .ck-placeholder {
10
+ @mixin ck-media-forced-colors {
11
+ /*
12
+ * This is needed for Edge on Windows to use the right color for the placeholder content (::before).
13
+ * See https://github.com/ckeditor/ckeditor5/issues/14907.
14
+ */
15
+ forced-color-adjust: preserve-parent-color;
16
+ }
17
+
8
18
  &::before {
9
19
  cursor: text;
10
- color: var(--ck-color-engine-placeholder-text);
20
+
21
+ @mixin ck-media-default-colors {
22
+ color: var(--ck-color-engine-placeholder-text);
23
+ }
24
+
25
+ @mixin ck-media-forced-colors {
26
+ /*
27
+ * In the high contrast mode there is no telling between regular and placeholder text. Using
28
+ * italic text to address that issue. See https://github.com/ckeditor/ckeditor5/issues/14907.
29
+ */
30
+ font-style: italic;
31
+
32
+ /*
33
+ * Without this margin, the caret will not show up and blink when the user puts the selection
34
+ * in the placeholder (Edge on Windows). See https://github.com/ckeditor/ckeditor5/issues/14907.
35
+ */
36
+ margin-left: 1px;
37
+ }
11
38
  }
12
39
  }
@@ -57,6 +57,17 @@
57
57
  /* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */
58
58
  box-sizing: border-box;
59
59
  }
60
+
61
+ @media (prefers-reduced-motion: reduce) {
62
+ animation-duration: 0ms;
63
+
64
+ &::after {
65
+ animation: none;
66
+ opacity: 1;
67
+ width: 0.3em;
68
+ height: 0.45em;
69
+ }
70
+ }
60
71
  }
61
72
 
62
73
  @keyframes ck-upload-complete-icon-show {
@@ -9,6 +9,11 @@
9
9
  /* Showing animation. */
10
10
  &.ck-appear {
11
11
  animation: fadeIn 700ms;
12
+
13
+ @media (prefers-reduced-motion: reduce) {
14
+ opacity: 1;
15
+ animation: none;
16
+ }
12
17
  }
13
18
  }
14
19
 
@@ -25,6 +25,10 @@
25
25
  var(--ck-color-restricted-editing-exception-brackets) 100%
26
26
  ) 1;
27
27
 
28
+ @media (prefers-reduced-motion: reduce) {
29
+ transition: none;
30
+ }
31
+
28
32
  &.restricted-editing-exception_selected {
29
33
  background-color: var(--ck-color-restricted-editing-selected-exception-background);
30
34
  border-image: linear-gradient(
@@ -40,6 +40,10 @@
40
40
  transition: .2s ease box-shadow;
41
41
  border: 0;
42
42
 
43
+ @media (prefers-reduced-motion: reduce) {
44
+ transition: none;
45
+ }
46
+
43
47
  &:focus:not( .ck-disabled ),
44
48
  &:hover:not( .ck-disabled ) {
45
49
  /* Disable the default .ck-button's border ring. */
@@ -30,6 +30,10 @@
30
30
  outline: none;
31
31
  transition: none;
32
32
 
33
+ @media (prefers-reduced-motion: reduce) {
34
+ transition: none;
35
+ }
36
+
33
37
  &:focus {
34
38
  box-shadow: none;
35
39
  }
@@ -66,6 +66,10 @@
66
66
  }
67
67
 
68
68
  animation: ck-table-form-labeled-view-status-appear .15s ease both;
69
+
70
+ @media (prefers-reduced-motion: reduce) {
71
+ animation: none;
72
+ }
69
73
  }
70
74
 
71
75
  /* Hide the error balloon when the field is blurred. Makes the experience much more clear. */
@@ -41,6 +41,10 @@ a.ck.ck-button {
41
41
  /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */
42
42
  -webkit-appearance: none;
43
43
 
44
+ @media (prefers-reduced-motion: reduce) {
45
+ transition: none;
46
+ }
47
+
44
48
  &:active,
45
49
  &:focus {
46
50
  @mixin ck-focus-ring;
@@ -76,6 +76,10 @@ of the component, floating–point numbers have been used which, for the default
76
76
 
77
77
  /* Gently animate the inner part of the toggle switch */
78
78
  transition: all 300ms ease;
79
+
80
+ @media (prefers-reduced-motion: reduce) {
81
+ transition: none;
82
+ }
79
83
  }
80
84
 
81
85
  &:hover {
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  @import "../../../mixins/_rounded.css";
7
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";
7
8
 
8
9
  :root {
9
10
  --ck-color-grid-tile-size: 24px;
@@ -20,47 +21,72 @@
20
21
  }
21
22
 
22
23
  .ck.ck-color-grid__tile {
23
- width: var(--ck-color-grid-tile-size);
24
- height: var(--ck-color-grid-tile-size);
25
- min-width: var(--ck-color-grid-tile-size);
26
- min-height: var(--ck-color-grid-tile-size);
27
- padding: 0;
28
24
  transition: .2s ease box-shadow;
29
- border: 0;
25
+
26
+ @mixin ck-media-default-colors {
27
+ width: var(--ck-color-grid-tile-size);
28
+ height: var(--ck-color-grid-tile-size);
29
+ min-width: var(--ck-color-grid-tile-size);
30
+ min-height: var(--ck-color-grid-tile-size);
31
+ padding: 0;
32
+ border: 0;
33
+
34
+ &.ck-on,
35
+ &:focus:not( .ck-disabled ),
36
+ &:hover:not( .ck-disabled ) {
37
+ /* Disable the default .ck-button's border ring. */
38
+ border: 0;
39
+ }
40
+
41
+ &.ck-color-selector__color-tile_bordered {
42
+ box-shadow: 0 0 0 1px var(--ck-color-base-border);
43
+ }
44
+
45
+ &.ck-on {
46
+ box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);
47
+ }
48
+
49
+ &:focus:not( .ck-disabled ),
50
+ &:hover:not( .ck-disabled ) {
51
+ box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);
52
+ }
53
+ }
54
+
55
+ /*
56
+ * In high contrast mode, the colors are replaced with text labels.
57
+ * See https://github.com/ckeditor/ckeditor5/issues/14907.
58
+ */
59
+ @mixin ck-media-forced-colors {
60
+ width: unset;
61
+ height: unset;
62
+ min-width: unset;
63
+ min-height: unset;
64
+ padding: 0 var(--ck-spacing-small);
65
+
66
+ & .ck-button__label {
67
+ display: inline-block;
68
+ }
69
+ }
70
+
71
+ @media (prefers-reduced-motion: reduce) {
72
+ transition: none;
73
+ }
30
74
 
31
75
  &.ck-disabled {
32
76
  cursor: unset;
33
77
  transition: unset;
34
78
  }
35
79
 
36
- &.ck-color-selector__color-tile_bordered {
37
- box-shadow: 0 0 0 1px var(--ck-color-base-border);
38
- }
39
-
40
80
  & .ck.ck-icon {
41
81
  display: none;
42
82
  color: var(--ck-color-color-grid-check-icon);
43
83
  }
44
84
 
45
85
  &.ck-on {
46
- box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);
47
-
48
86
  & .ck.ck-icon {
49
87
  display: block;
50
88
  }
51
89
  }
52
-
53
- &.ck-on,
54
- &:focus:not( .ck-disabled ),
55
- &:hover:not( .ck-disabled ) {
56
- /* Disable the default .ck-button's border ring. */
57
- border: 0;
58
- }
59
-
60
- &:focus:not( .ck-disabled ),
61
- &:hover:not( .ck-disabled ) {
62
- box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);
63
- }
64
90
  }
65
91
 
66
92
  .ck.ck-color-grid__label {
@@ -28,6 +28,10 @@
28
28
  /* Apply some smooth transition to the box-shadow and border. */
29
29
  transition: box-shadow .1s ease-in-out, border .1s ease-in-out;
30
30
 
31
+ @media (prefers-reduced-motion: reduce) {
32
+ transition: none;
33
+ }
34
+
31
35
  &:focus {
32
36
  @mixin ck-focus-ring;
33
37
  @mixin ck-box-shadow var(--ck-focus-outer-shadow);
@@ -48,6 +52,10 @@
48
52
  border-color: var(--ck-color-input-error-border);
49
53
  animation: ck-input-shake .3s ease both;
50
54
 
55
+ @media (prefers-reduced-motion: reduce) {
56
+ animation: none;
57
+ }
58
+
51
59
  &:focus {
52
60
  @mixin ck-box-shadow var(--ck-focus-error-outer-shadow);
53
61
  }
@@ -53,6 +53,10 @@
53
53
  transform var(--ck-labeled-field-view-transition),
54
54
  padding var(--ck-labeled-field-view-transition),
55
55
  background var(--ck-labeled-field-view-transition);
56
+
57
+ @media (prefers-reduced-motion: reduce) {
58
+ transition: none;
59
+ }
56
60
  }
57
61
  }
58
62
 
@@ -11,6 +11,10 @@
11
11
  width: var(--ck-toolbar-spinner-size);
12
12
  height: var(--ck-toolbar-spinner-size);
13
13
  animation: 1.5s infinite rotate linear;
14
+
15
+ @media (prefers-reduced-motion: reduce) {
16
+ animation-duration: 3s;
17
+ }
14
18
  }
15
19
 
16
20
  .ck.ck-spinner {
@@ -26,4 +30,3 @@
26
30
  transform: rotate(360deg)
27
31
  }
28
32
  }
29
-
@@ -5,6 +5,7 @@
5
5
 
6
6
  @import "../mixins/_focus.css";
7
7
  @import "../mixins/_shadow.css";
8
+ @import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";
8
9
 
9
10
  :root {
10
11
  --ck-widget-outline-thickness: 3px;
@@ -24,6 +25,10 @@
24
25
  outline-color: transparent;
25
26
  transition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);
26
27
 
28
+ @media (prefers-reduced-motion: reduce) {
29
+ transition: none;
30
+ }
31
+
27
32
  &.ck-widget_selected,
28
33
  &.ck-widget_selected:hover {
29
34
  outline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);
@@ -43,8 +48,9 @@
43
48
  &:focus {
44
49
  @mixin ck-focus-ring;
45
50
  @mixin ck-box-shadow var(--ck-inner-shadow);
46
-
47
- background-color: var(--ck-color-widget-editable-focus-background);
51
+ @mixin ck-media-default-colors {
52
+ background-color: var(--ck-color-widget-editable-focus-background);
53
+ }
48
54
  }
49
55
  }
50
56
 
@@ -74,6 +80,10 @@
74
80
  left: calc(0px - var(--ck-widget-outline-thickness));
75
81
  top: 0;
76
82
 
83
+ @media (prefers-reduced-motion: reduce) {
84
+ transition: none;
85
+ }
86
+
77
87
  & .ck-icon {
78
88
  /* Make sure the dimensions of the icon are independent of the fon-size of the content. */
79
89
  width: var(--ck-widget-handler-icon-size);
@@ -86,6 +96,10 @@
86
96
 
87
97
  /* Note: The animation is longer on purpose. Simply feels better. */
88
98
  transition: opacity 300ms var(--ck-widget-handler-animation-curve);
99
+
100
+ @media (prefers-reduced-motion: reduce) {
101
+ transition: none;
102
+ }
89
103
  }
90
104
  }
91
105
 
@@ -36,6 +36,10 @@
36
36
 
37
37
  @mixin ck-widget-type-around-button-hidden;
38
38
 
39
+ @media (prefers-reduced-motion: reduce) {
40
+ transition: none;
41
+ }
42
+
39
43
  & svg {
40
44
  width: 10px;
41
45
  height: 8px;
@@ -43,6 +47,10 @@
43
47
  transition: transform .5s ease;
44
48
  margin-top: 1px;
45
49
 
50
+ @media (prefers-reduced-motion: reduce) {
51
+ transition: none;
52
+ }
53
+
46
54
  & * {
47
55
  stroke-dasharray: 10;
48
56
  stroke-dashoffset: 0;
@@ -77,6 +85,20 @@
77
85
  animation: ck-widget-type-around-arrow-tip-dash 2s linear;
78
86
  }
79
87
  }
88
+
89
+ @media (prefers-reduced-motion: reduce) {
90
+ animation: none;
91
+
92
+ & svg {
93
+ & polyline {
94
+ animation: none;
95
+ }
96
+
97
+ & line {
98
+ animation: none;
99
+ }
100
+ }
101
+ }
80
102
  }
81
103
  }
82
104