瀏覽代碼

Merge pull request #259 from ckeditor/i/5829

Other: Add hover state for all restricted editing exceptions and fix the width of a collapsed exception in restricted editing. Closes ckeditor/ckeditor5#5829.
Piotrek Koszuliński 5 年之前
父節點
當前提交
425e83feff

+ 9 - 1
packages/ckeditor5-theme-lark/theme/ckeditor5-restricted-editing/restrictedediting.css

@@ -5,6 +5,7 @@
 
 :root {
 	--ck-color-restricted-editing-exception-background: hsla(31, 100%, 65%, .2);
+	--ck-color-restricted-editing-exception-hover-background: hsla(31, 100%, 65%, .35);
 	--ck-color-restricted-editing-exception-brackets: hsla(31, 100%, 40%, .4);
 	--ck-color-restricted-editing-selected-exception-background: hsla(31, 100%, 65%, .5);
 	--ck-color-restricted-editing-selected-exception-brackets: hsla(31, 100%, 40%, .6);
@@ -36,7 +37,14 @@
 	}
 
 	&.restricted-editing-exception_collapsed {
-		padding-left: 1em;
+		/* Empty exception should have the same width as exception with at least 1 char */
+		padding-left: 1ch;
+	}
+}
+
+.ck-restricted-editing_mode_restricted .restricted-editing-exception {
+	&:hover {
+		background: var(--ck-color-restricted-editing-exception-hover-background);
 	}
 }