Browse Source

Other: Introduced consistent height and spacing among headings dropdown items. Closes #63.

Aleksander Nowodzinski 8 years ago
parent
commit
6080b84e9a
1 changed files with 11 additions and 0 deletions
  1. 11 0
      packages/ckeditor5-heading/theme/theme.scss

+ 11 - 0
packages/ckeditor5-heading/theme/theme.scss

@@ -1,6 +1,9 @@
 // Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 // For licensing, see LICENSE.md or http://ckeditor.com/license
 
+@import '~@ckeditor/ckeditor5-theme-lark/theme/helpers/_spacing';
+@import '~@ckeditor/ckeditor5-theme-lark/theme/helpers/_fonts';
+
 .ck-heading_heading {
 	&1 {
 		font-size: 1.5em;
@@ -15,6 +18,14 @@
 	}
 }
 
+// Using absolute units to make sure each element has the same height and padding.
+// https://github.com/ckeditor/ckeditor5-heading/issues/63
+[class*="ck-heading_"] {
+	line-height: 1.8 * $ck-font-size-base;
+	// Strip the units from $ck-def-spacing here.
+	padding: $ck-def-spacing / ( $ck-def-spacing * 0 + 1 ) * $ck-font-size-base;
+}
+
 [class*="ck-heading_heading"] {
 	font-weight: bold;
 }