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

Feature: Added styles for active .ck-list__item.

Aleksander Nowodzinski 9 лет назад
Родитель
Сommit
888e2983b5
1 измененных файлов с 28 добавлено и 1 удалено
  1. 28 1
      packages/ckeditor5-theme-lark/theme/components/list.scss

+ 28 - 1
packages/ckeditor5-theme-lark/theme/components/list.scss

@@ -8,10 +8,22 @@
 	@include ck-rounded-corners();
 	@include ck-rounded-corners();
 
 
 	&__item {
 	&__item {
-		padding: ck-spacing( 'medium' );
+		padding: ck-spacing( 'medium' ) ck-spacing( 'medium' ) ck-spacing( 'medium' ) 0;
 		cursor: pointer;
 		cursor: pointer;
 		min-width: 12em;
 		min-width: 12em;
 
 
+		// NOTE: Using absolute sizes here because otherwise each
+		// item would indent in a different way.
+		&::before {
+			content: "";
+			display: inline-block;
+			width: $ck-font-size-base;
+			font-weight: normal;
+			font-size: $ck-font-size-base;
+			text-align: center;
+			margin: 0 $ck-font-size-base/2;
+		}
+
 		&:hover,
 		&:hover,
 		&:focus {
 		&:focus {
 			background: ck-color( 'foreground' );
 			background: ck-color( 'foreground' );
@@ -19,11 +31,26 @@
 
 
 		&:focus {
 		&:focus {
 			@include ck-box-shadow( $ck-focus-outer-shadow );
 			@include ck-box-shadow( $ck-focus-outer-shadow );
+			position: relative;
+			z-index: ck-z();
 			outline: none;
 			outline: none;
 		}
 		}
 
 
 		&:last-of-type {
 		&:last-of-type {
 			border: none;
 			border: none;
 		}
 		}
+
+		&_active {
+			background: ck-color( 'foreground', -5 );
+
+			&::before {
+				content: "✓";
+			}
+
+			&:hover,
+			&:focus {
+				background: ck-color( 'foreground', -10 );
+			}
+		}
 	}
 	}
 }
 }