8
0
فهرست منبع

Merge branch 'i/5696'

Marek Lewandowski 6 سال پیش
والد
کامیت
8f59400632
3فایلهای تغییر یافته به همراه18 افزوده شده و 9 حذف شده
  1. 3 0
      packages/ckeditor5-widget/.stylelintrc
  2. 8 2
      packages/ckeditor5-widget/package.json
  3. 7 7
      packages/ckeditor5-widget/theme/widget.css

+ 3 - 0
packages/ckeditor5-widget/.stylelintrc

@@ -0,0 +1,3 @@
+{
+	"extends": "stylelint-config-ckeditor5"
+}

+ 8 - 2
packages/ckeditor5-widget/package.json

@@ -31,7 +31,9 @@
     "eslint": "^5.5.0",
     "eslint-config-ckeditor5": "^2.0.0",
     "husky": "^1.3.1",
-    "lint-staged": "^7.0.0"
+    "lint-staged": "^7.0.0",
+    "stylelint": "^11.1.1",
+    "stylelint-config-ckeditor5": "^1.0.0"
   },
   "engines": {
     "node": ">=8.0.0",
@@ -51,11 +53,15 @@
     "theme"
   ],
   "scripts": {
-    "lint": "eslint --quiet '**/*.js'"
+    "lint": "eslint --quiet '**/*.js'",
+    "stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css' 'docs/**/*.css'"
   },
   "lint-staged": {
     "**/*.js": [
       "eslint --quiet"
+    ],
+    "**/*.css": [
+      "stylelint --quiet --allow-empty-input"
     ]
   },
   "eslintIgnore": [

+ 7 - 7
packages/ckeditor5-widget/theme/widget.css

@@ -21,13 +21,6 @@
 	/* Make the widget wrapper a relative positioning container for the drag handle. */
 	position: relative;
 
-	/* Show the selection handle on mouse hover over the widget. */
-	&:hover {
-		& .ck-widget__selection-handle {
-			visibility: visible;
-		}
-	}
-
 	& .ck-widget__selection-handle {
 		position: absolute;
 
@@ -38,6 +31,13 @@
 		}
 	}
 
+	/* Show the selection handle on mouse hover over the widget. */
+	&:hover {
+		& .ck-widget__selection-handle {
+			visibility: visible;
+		}
+	}
+
 	/* Show the selection handle when the widget is selected. */
 	&.ck-widget_selected .ck-widget__selection-handle {
 		visibility: visible;