8
0
فهرست منبع

Improve recent colors sryles.

Mateusz Samsel 6 سال پیش
والد
کامیت
a3269343b6
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 3 2
      packages/ckeditor5-font/src/ui/colortableview.js
  2. 6 1
      packages/ckeditor5-font/theme/fontcolor.css

+ 3 - 2
packages/ckeditor5-font/src/ui/colortableview.js

@@ -42,9 +42,9 @@ export default class ColorTableView extends View {
 			children: this.items
 			children: this.items
 		} );
 		} );
 
 
+		this.items.add( this.removeColorButton() );
 		this.items.add( this.createColorTableTemplate() );
 		this.items.add( this.createColorTableTemplate() );
 		this.items.add( this.recentlyUsed() );
 		this.items.add( this.recentlyUsed() );
-		this.items.add( this.removeColorButton() );
 
 
 		this._focusCycler = new FocusCycler( {
 		this._focusCycler = new FocusCycler( {
 			focusables: this.items,
 			focusables: this.items,
@@ -119,7 +119,8 @@ export default class ColorTableView extends View {
 		for ( let i = 0; i < this.colorColumns; i++ ) {
 		for ( let i = 0; i < this.colorColumns; i++ ) {
 			this.recentlyUsedColors.add( {
 			this.recentlyUsedColors.add( {
 				color: 'hsla( 0, 0%, 0%, 0 )',
 				color: 'hsla( 0, 0%, 0%, 0 )',
-				isEnabled: false
+				isEnabled: false,
+				hasBorder: true
 			} );
 			} );
 		}
 		}
 	}
 	}

+ 6 - 1
packages/ckeditor5-font/theme/fontcolor.css

@@ -29,11 +29,16 @@
 	transition: 200ms ease box-shadow;
 	transition: 200ms ease box-shadow;
 }
 }
 
 
+.ck .ck-disabled.ck-color-table__color-tile {
+	cursor: unset;
+	transition: unset;
+}
+
 .ck .ck-color-table__color-tile_bordered {
 .ck .ck-color-table__color-tile_bordered {
 	box-shadow: 0 0 0 1px var(--ck-color-table-color-tile-border);
 	box-shadow: 0 0 0 1px var(--ck-color-table-color-tile-border);
 }
 }
 
 
-.ck .ck-color-table__color-tile:hover {
+.ck .ck-color-table__color-tile:hover :not( .ck-disabled ) {
 	box-shadow: 0 0 0 2px var(--ck-color-table-color-tile-border-active);
 	box-shadow: 0 0 0 2px var(--ck-color-table-color-tile-border-active);
 }
 }