Sfoglia il codice sorgente

Made tooltips enabled for buttons with text by default. Moved restriction into the .ck-toolbar scope.

Aleksander Nowodzinski 9 anni fa
parent
commit
281887af68

+ 2 - 5
packages/ckeditor5-theme-lark/theme/components/button.scss

@@ -124,11 +124,8 @@ a.ck-button {
 		@include ck-tooltip_visible();
 	}
 
-	// Tooltip tweaks:
-	//   1. Get rid of the focus outline around the tooltip when focused (but not :hover).
-	//   2. Don't display tooltips for buttons with text; text explains the button anyway.
-	&:focus:not(:hover),
-	&.ck-button_with-text {
+	// Get rid of the focus outline around the tooltip when focused (but not :hover).
+	&:focus:not(:hover) {
 		@include ck-tooltip_disabled();
 	}
 

+ 0 - 17
packages/ckeditor5-theme-lark/theme/components/dropdown.scss

@@ -23,23 +23,6 @@
 	}
 
 	.ck-button.ck-dropdown__button {
-		// Tooltips are disabled for buttons with text. Dropdowns are a different
-		// case because their buttons do not trigger the action itself but
-		// give an access to a set of actions. What is displayed in the button
-		// label not necessarily describes purpose of the dropdown (but it's state)
-		// so tooltips should be enabled here.
-		@include ck-tooltip_enabled();
-
-		&:hover {
-			@include ck-tooltip_visible();
-		}
-
-		// Get rid of the focus outline around the tooltip when focused
-		// (but keep it when :hover).
-		&:focus:not(:hover) {
-			@include ck-tooltip_disabled();
-		}
-
 		// A space to accommodate the triangle.
 		padding-right: 2 * ck-spacing();
 

+ 6 - 2
packages/ckeditor5-theme-lark/theme/components/editor.scss

@@ -22,8 +22,12 @@
 			@include ck-button-colors( 'foreground', -10 );
 		}
 
-		// Don't display tooltips for disabled buttons in the toolbar,
-		// they're unavailable anyway.
+		// Tooltip tweaks:
+		//    1. Don't display tooltips for disabled buttons in the toolbar,
+		//       they're unavailable anyway.
+		//    2. Don't display tooltips for buttons with text; text explains
+		//       the button anyway.
+		&.ck-button_with-text:not(.ck-dropdown__button),
 		&.ck-disabled {
 			@include ck-tooltip_disabled();
 		}