From f8e65a20b6f17e5b0d7324df19b6d7b9de067232 Mon Sep 17 00:00:00 2001 From: ryelle Date: Tue, 22 Dec 2020 16:53:06 +0000 Subject: [PATCH] Twenty Twenty-One: Set a maximum width on inputs. Text inputs with a size attribute can end up longer than the screen width on small screens. A max-width of 100% keeps the inputs from breaking out of the container. Props basscan, kjellr, poena, sabernhardt Fixes #52083. Built from https://develop.svn.wordpress.org/trunk@49870 git-svn-id: http://core.svn.wordpress.org/trunk@49589 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentytwentyone/assets/css/ie.css | 15 +++++++++++++++ .../assets/sass/04-elements/forms.scss | 1 + wp-content/themes/twentytwentyone/style-rtl.css | 1 + wp-content/themes/twentytwentyone/style.css | 1 + wp-includes/version.php | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentytwentyone/assets/css/ie.css b/wp-content/themes/twentytwentyone/assets/css/ie.css index c34188e6d8..0fbabf9b6c 100644 --- a/wp-content/themes/twentytwentyone/assets/css/ie.css +++ b/wp-content/themes/twentytwentyone/assets/css/ie.css @@ -1475,6 +1475,7 @@ input[type=text] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=email] { @@ -1484,6 +1485,7 @@ input[type=email] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=url] { @@ -1493,6 +1495,7 @@ input[type=url] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=password] { @@ -1502,6 +1505,7 @@ input[type=password] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=search] { @@ -1511,6 +1515,7 @@ input[type=search] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=number] { @@ -1520,6 +1525,7 @@ input[type=number] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=tel] { @@ -1529,6 +1535,7 @@ input[type=tel] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=date] { @@ -1538,6 +1545,7 @@ input[type=date] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=month] { @@ -1547,6 +1555,7 @@ input[type=month] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=week] { @@ -1556,6 +1565,7 @@ input[type=week] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=time] { @@ -1565,6 +1575,7 @@ input[type=time] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=datetime] { @@ -1574,6 +1585,7 @@ input[type=datetime] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=datetime-local] { @@ -1583,6 +1595,7 @@ input[type=datetime-local] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=color] { @@ -1592,6 +1605,7 @@ input[type=color] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } .site textarea { @@ -1601,6 +1615,7 @@ input[type=color] { line-height: 1.7; padding: 10px; margin: 0 2px; + max-width: 100%; } input[type=text]:focus { diff --git a/wp-content/themes/twentytwentyone/assets/sass/04-elements/forms.scss b/wp-content/themes/twentytwentyone/assets/sass/04-elements/forms.scss index 08880c830f..6e734aae29 100644 --- a/wp-content/themes/twentytwentyone/assets/sass/04-elements/forms.scss +++ b/wp-content/themes/twentytwentyone/assets/sass/04-elements/forms.scss @@ -20,6 +20,7 @@ input[type="color"], padding: var(--form--spacing-unit); // Gives a little more space for the outline offset. margin: 0 2px; + max-width: 100%; &:focus { color: var(--form--color-text); diff --git a/wp-content/themes/twentytwentyone/style-rtl.css b/wp-content/themes/twentytwentyone/style-rtl.css index 4b2fe9f993..049abb9c5f 100644 --- a/wp-content/themes/twentytwentyone/style-rtl.css +++ b/wp-content/themes/twentytwentyone/style-rtl.css @@ -1217,6 +1217,7 @@ input[type=color], line-height: var(--global--line-height-body); padding: var(--form--spacing-unit); margin: 0 2px; + max-width: 100%; } input[type=text]:focus, diff --git a/wp-content/themes/twentytwentyone/style.css b/wp-content/themes/twentytwentyone/style.css index ebf07438fc..a7c4267f1e 100644 --- a/wp-content/themes/twentytwentyone/style.css +++ b/wp-content/themes/twentytwentyone/style.css @@ -1225,6 +1225,7 @@ input[type=color], line-height: var(--global--line-height-body); padding: var(--form--spacing-unit); margin: 0 2px; + max-width: 100%; } input[type=text]:focus, diff --git a/wp-includes/version.php b/wp-includes/version.php index 09193a88cd..fa65d9c068 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49866'; +$wp_version = '5.7-alpha-49870'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.