diff --git a/packages/block-library/src/code/editor.scss b/packages/block-library/src/code/editor.scss index 1f53d244794e4..ec54fd99ad2bc 100644 --- a/packages/block-library/src/code/editor.scss +++ b/packages/block-library/src/code/editor.scss @@ -1,8 +1,13 @@ .wp-block-code .editor-plain-text { font-family: $editor-html-font; - font-size: $text-editor-font-size; color: $dark-gray-800; + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $default-font-size; + } + &:focus { box-shadow: none; } diff --git a/packages/block-library/src/html/editor.scss b/packages/block-library/src/html/editor.scss index 44daf03dd370a..97d4b156aea79 100644 --- a/packages/block-library/src/html/editor.scss +++ b/packages/block-library/src/html/editor.scss @@ -1,11 +1,16 @@ .wp-block-html .editor-plain-text { font-family: $editor-html-font; - font-size: $text-editor-font-size; color: $dark-gray-800; padding: 0.8em 1em; border: 1px solid $light-gray-500; border-radius: 4px; + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $default-font-size; + } + &:focus { box-shadow: none; } diff --git a/packages/block-library/src/preformatted/theme.scss b/packages/block-library/src/preformatted/theme.scss index 920ecf7de4238..e0a221912e620 100644 --- a/packages/block-library/src/preformatted/theme.scss +++ b/packages/block-library/src/preformatted/theme.scss @@ -1,7 +1,12 @@ .wp-block-preformatted { pre { font-family: $editor-html-font; - font-size: $text-editor-font-size; color: $dark-gray-800; + + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $text-editor-font-size; + } } } diff --git a/packages/components/src/form-token-field/style.scss b/packages/components/src/form-token-field/style.scss index 1080070a4ddaf..99fbc607c819a 100644 --- a/packages/components/src/form-token-field/style.scss +++ b/packages/components/src/form-token-field/style.scss @@ -31,7 +31,6 @@ min-height: 24px; background: inherit; border: 0; - font-size: $default-font-size; color: $dark-gray-800; box-shadow: none; diff --git a/packages/edit-post/src/components/text-editor/style.scss b/packages/edit-post/src/components/text-editor/style.scss index 1a5980bc5e022..e925344dc9e3a 100644 --- a/packages/edit-post/src/components/text-editor/style.scss +++ b/packages/edit-post/src/components/text-editor/style.scss @@ -16,6 +16,7 @@ .edit-post-text-editor { width: 100%; + max-width: calc(100% - #{$grid-size-large * 2}); margin-left: $grid-size-large; margin-right: $grid-size-large; diff --git a/packages/edit-post/src/style.scss b/packages/edit-post/src/style.scss index 90fac100e15ee..83f2a77745458 100644 --- a/packages/edit-post/src/style.scss +++ b/packages/edit-post/src/style.scss @@ -174,10 +174,15 @@ body.block-editor-page { select, textarea { font-family: $default-font; - font-size: $default-font-size; padding: 6px 8px; @include input-style__neutral(); + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $default-font-size; + } + &:focus { @include input-style__focus(); } diff --git a/packages/editor/src/components/post-text-editor/style.scss b/packages/editor/src/components/post-text-editor/style.scss index 4f6e9ac44ceb7..fd1c77195cc2f 100644 --- a/packages/editor/src/components/post-text-editor/style.scss +++ b/packages/editor/src/components/post-text-editor/style.scss @@ -7,9 +7,14 @@ resize: none; overflow: hidden; font-family: $editor-html-font; - font-size: $text-editor-font-size; line-height: 150%; + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $text-editor-font-size; + } + &:hover, &:focus { border: $border-width solid $light-gray-500; diff --git a/packages/editor/src/components/url-input/style.scss b/packages/editor/src/components/url-input/style.scss index 64429e6d6c4e4..2c1662a4c2ed5 100644 --- a/packages/editor/src/components/url-input/style.scss +++ b/packages/editor/src/components/url-input/style.scss @@ -20,6 +20,12 @@ $input-size: 300px; margin-left: 0; margin-right: 0; + /* Fonts smaller than 16px causes mobile safari to zoom. */ + font-size: $mobile-text-min-font-size; + @include break-small { + font-size: $default-font-size; + } + &::-ms-clear { display: none; }