From 9087615a4fb4b41a59c23f5f575f3fe7f63f1f29 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 12 Feb 2024 18:50:47 +0000 Subject: [PATCH] Twenty Nineteen: Correct line height for Button block. This commit moves `line-height` to the Buttons container and removes the duplicate `outline` property. Props sabernhardt, nidhidhandhukiya, monzuralam, shailu25, hrrarya, karmatosed, harshgajipara, nicolefurlan, fnpen, oglekler, poena, huzaifaalmesbah, audrasjb. Fixes #58443. git-svn-id: https://develop.svn.wordpress.org/trunk@57599 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentynineteen/sass/blocks/_blocks.scss | 8 +++++--- src/wp-content/themes/twentynineteen/style-editor.css | 5 ++++- src/wp-content/themes/twentynineteen/style-editor.scss | 5 ++++- src/wp-content/themes/twentynineteen/style-rtl.css | 6 ++++-- src/wp-content/themes/twentynineteen/style.css | 9 ++++++--- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 4181c218d0..cb9157ceff 100644 --- a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -163,7 +163,11 @@ } } - //! Button + //! Buttons + .wp-block-buttons { + line-height: $font__line-height-heading; + } + .wp-block-button { .wp-block-button__link { @@ -171,13 +175,11 @@ border: none; font-size: $font__size-sm; @include font-family( $font__heading ); - line-height: $font__line-height-heading; box-sizing: border-box; font-weight: bold; text-decoration: none; padding: ($size__spacing-unit * .76) $size__spacing-unit; outline: none; - outline: none; &:not(.has-background) { background-color: $color__background-button; diff --git a/src/wp-content/themes/twentynineteen/style-editor.css b/src/wp-content/themes/twentynineteen/style-editor.css index 54575e038b..a68ec33a01 100644 --- a/src/wp-content/themes/twentynineteen/style-editor.css +++ b/src/wp-content/themes/twentynineteen/style-editor.css @@ -1004,8 +1004,11 @@ figcaption, } /** === Button === */ +.wp-block-buttons { + line-height: 1.2; +} + .wp-block-button .wp-block-button__link { - line-height: inherit; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 0.88889em; font-weight: bold; diff --git a/src/wp-content/themes/twentynineteen/style-editor.scss b/src/wp-content/themes/twentynineteen/style-editor.scss index 6bf5507d1b..21e461884c 100644 --- a/src/wp-content/themes/twentynineteen/style-editor.scss +++ b/src/wp-content/themes/twentynineteen/style-editor.scss @@ -379,10 +379,13 @@ figcaption, /** === Button === */ +.wp-block-buttons { + line-height: $font__line-height-heading; +} + .wp-block-button { .wp-block-button__link { - line-height:inherit; @include font-family( $font__heading ); font-size: $font__size-sm; font-weight: bold; diff --git a/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index de379c35b0..61dd6896c4 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/wp-content/themes/twentynineteen/style-rtl.css @@ -5484,18 +5484,20 @@ body.page .main-navigation { width: 100%; } +.entry .entry-content .wp-block-buttons { + line-height: 1.2; +} + .entry .entry-content .wp-block-button .wp-block-button__link { transition: background 150ms ease-in-out; border: none; font-size: 0.88889em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - line-height: 1.2; box-sizing: border-box; font-weight: bold; text-decoration: none; padding: 0.76rem 1rem; outline: none; - outline: none; } .entry .entry-content .wp-block-button .wp-block-button__link:not(.has-background) { diff --git a/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index 0ddd9657d3..c4928c6c1e 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/wp-content/themes/twentynineteen/style.css @@ -2804,7 +2804,8 @@ body.page .main-navigation { background: transparent; color: inherit; cursor: pointer; - transition: background 250ms ease-in-out, transform 150ms ease; + transition: background 250ms ease-in-out, + transform 150ms ease; -webkit-appearance: none; -moz-appearance: none; } @@ -5496,18 +5497,20 @@ body.page .main-navigation { width: 100%; } +.entry .entry-content .wp-block-buttons { + line-height: 1.2; +} + .entry .entry-content .wp-block-button .wp-block-button__link { transition: background 150ms ease-in-out; border: none; font-size: 0.88889em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - line-height: 1.2; box-sizing: border-box; font-weight: bold; text-decoration: none; padding: 0.76rem 1rem; outline: none; - outline: none; } .entry .entry-content .wp-block-button .wp-block-button__link:not(.has-background) {