Browse Source

Merge branch 'i/5696'

Marek Lewandowski 6 năm trước cách đây
mục cha
commit
39dfbf4d3d

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

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

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

@@ -33,7 +33,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",
@@ -53,11 +55,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": [

+ 12 - 16
packages/ckeditor5-list/theme/todolist.css

@@ -7,22 +7,6 @@
 	--ck-todo-list-checkmark-size: 16px;
 }
 
-/*
- * To-do list should be interactive only during the editing
- * (https://github.com/ckeditor/ckeditor5/issues/2090).
- */
-.ck-editor__editable .todo-list {
-	& .todo-list__label {
-		& > input {
-			cursor: pointer;
-
-			&:hover::before {
-				box-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);
-			}
-		}
-	}
-}
-
 .ck-content .todo-list {
 	list-style: none;
 
@@ -107,3 +91,15 @@
 	right: -25px;
 	margin-left: -15px;
 }
+
+/*
+ * To-do list should be interactive only during the editing
+ * (https://github.com/ckeditor/ckeditor5/issues/2090).
+ */
+.ck-editor__editable .todo-list .todo-list__label > input {
+	cursor: pointer;
+
+	&:hover::before {
+		box-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);
+	}
+}