8
0
Просмотр исходного кода

Move fake care pulse keyframes definition to a global animations CSS import.

Maciej Gołaszewski 5 лет назад
Родитель
Сommit
5f722b8472

+ 1 - 1
packages/ckeditor5-theme-lark/theme/ckeditor5-link/link.css

@@ -20,5 +20,5 @@
 	border-left: 1px solid var(--ck-color-base-text);
 	margin-left: -1px;
 	outline: solid 1px hsla(0, 0%, 100%, .5);
-	animation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;
+	animation: ck-fake-caret-pulse linear 1s infinite normal forwards;
 }

+ 22 - 0
packages/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_animations.css

@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+@keyframes ck-fake-caret-pulse {
+	0% {
+		opacity: 1;
+	}
+	49% {
+		opacity: 1;
+	}
+	50% {
+		opacity: 0;
+	}
+	99% {
+		opacity: 0;
+	}
+	100% {
+		opacity: 1;
+	}
+}

+ 1 - 0
packages/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/globals.css

@@ -3,6 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
+@import "./_animations.css";
 @import "./_colors.css";
 @import "./_disabled.css";
 @import "./_focus.css";

+ 1 - 19
packages/ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css

@@ -129,7 +129,7 @@
 	& .ck-widget__type-around__fake-caret {
 		pointer-events: none;
 		height: 1px;
-		animation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;
+		animation: ck-fake-caret-pulse linear 1s infinite normal forwards;
 
 		/*
 		 * The semi-transparent-outline+background combo improves the contrast
@@ -250,21 +250,3 @@
 		box-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));
 	}
 }
-
-@keyframes ck-widget-type-around-fake-caret-pulse {
-	0% {
-		opacity: 1;
-	}
-	49% {
-		opacity: 1;
-	}
-	50% {
-		opacity: 0;
-	}
-	99% {
-		opacity: 0;
-	}
-	100% {
-		opacity: 1;
-	}
-}