浏览代码

Added styles for the ToolbarView#isCompact property.

Aleksander Nowodzinski 5 年之前
父节点
当前提交
5f85ddc626
共有 1 个文件被更改,包括 27 次插入0 次删除
  1. 27 0
      packages/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css

+ 27 - 0
packages/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css

@@ -44,6 +44,33 @@
 		}
 	}
 
+	&.ck-toolbar_compact {
+		/* No spacing around items. */
+		padding: 0;
+
+		& .ck-toolbar__items > .ck {
+			/* No spacing between items. */
+			margin: 0;
+
+			/* No rounded corners on the right side of the first child. */
+			&:first-child {
+				border-top-right-radius: 0;
+				border-bottom-right-radius: 0;
+			}
+
+			/* No rounded corners on the left side of the last child. */
+			&:last-child {
+				border-top-left-radius: 0;
+				border-bottom-left-radius: 0;
+			}
+
+			/* "Middle" children should have no rounded corners. */
+			&:not(:first-child):not(:last-child) {
+				border-radius: 0;
+			}
+		}
+	}
+
 	& > .ck-toolbar__items > *,
 	& > .ck.ck-toolbar__grouped-dropdown {
 		/* Make sure items wrapped to the next line have v-spacing */