Browse Source

Add line height to site description block to prevent jump

Previously, the block would jump around as the line height and size
were not consistent. This makes those consistent and makes
sure that they are also applied during block focus.
Noah Allen 6 years ago
parent
commit
25868fa6d2
2 changed files with 9 additions and 3 deletions
  1. 2 1
      modern-business/style-editor.css
  2. 7 2
      modern-business/style-editor.scss

+ 2 - 1
modern-business/style-editor.css

@@ -1840,9 +1840,10 @@ ul.wp-block-archives li ul,
 }
 }
 
 
 /** === Site Description Block === */
 /** === Site Description Block === */
-.wp-block-a8c-site-description {
+.wp-block-a8c-site-description, .wp-block-a8c-site-description:focus {
   text-align: center;
   text-align: center;
   margin: 0;
   margin: 0;
+  line-height: 0.8em;
 }
 }
 
 
 /** === Classic Editor === */
 /** === Classic Editor === */

+ 7 - 2
modern-business/style-editor.scss

@@ -910,8 +910,13 @@ ul.wp-block-archives,
 /** === Site Description Block === */
 /** === Site Description Block === */
 
 
 .wp-block-a8c-site-description {
 .wp-block-a8c-site-description {
-	text-align: center;
-	margin: 0;
+	&,&:focus {
+		text-align: center;
+		margin: 0;
+		// Line height rounded up from the description text-size set in style.css.
+		// It needs to be a bit larger to prevent text from getting cropped on top.
+		line-height: 0.8em;
+	}
 }
 }
 
 
 /** === Classic Editor === */
 /** === Classic Editor === */