From 8b935e5b33326d9a0fe943c49781592533a27355 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 21 Mar 2024 17:54:11 +0000 Subject: [PATCH] Revert "UX: Make input sizing consistent across all browsers (#26159)" (#26295) This reverts commit d0d4a363d4801a274caad50ffa509fc64740f238. This causes issues for people that have specified explicit font sizes in their browser - reverting while we investigate. https://meta.discourse.org/t/300374 --- app/assets/stylesheets/common/font-variables.scss | 2 +- app/assets/stylesheets/common/foundation/mixins.scss | 6 +++++- app/assets/stylesheets/mobile/discourse.scss | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/common/font-variables.scss b/app/assets/stylesheets/common/font-variables.scss index 7b9647a8812..4d6972e54bc 100644 --- a/app/assets/stylesheets/common/font-variables.scss +++ b/app/assets/stylesheets/common/font-variables.scss @@ -30,7 +30,7 @@ // inputs/textareas in iOS need to be at least 16px to avoid triggering zoom on focus // with base at 15px, the below gives 16.05px - --font-size-input: max(1em, 16px); + --font-size-ios-input: 1.07em; // Common line-heights --line-height-small: 1; diff --git a/app/assets/stylesheets/common/foundation/mixins.scss b/app/assets/stylesheets/common/foundation/mixins.scss index 481ff862082..eb861d2ea28 100644 --- a/app/assets/stylesheets/common/foundation/mixins.scss +++ b/app/assets/stylesheets/common/foundation/mixins.scss @@ -114,7 +114,11 @@ $hpad: 0.65em; line-height: normal; box-sizing: border-box; padding: $vpad $hpad; - font-size: var(--font-size-input); + .ios-device & { + font-size: var(--font-size-ios-input); + padding-top: $vpad * 0.8; + padding-bottom: $vpad * 0.8; + } } @mixin sticky { diff --git a/app/assets/stylesheets/mobile/discourse.scss b/app/assets/stylesheets/mobile/discourse.scss index 65c6f108847..df3b7ae2387 100644 --- a/app/assets/stylesheets/mobile/discourse.scss +++ b/app/assets/stylesheets/mobile/discourse.scss @@ -9,8 +9,16 @@ body { background-color: var(--secondary); } -textarea { - font-size: var(--font-size-input); +.ios-device { + textarea { + background-color: var(--secondary); + font-size: var(--font-size-ios-input); + -webkit-tap-highlight-color: transparent; + } + + input#reply-title { + -webkit-tap-highlight-color: transparent; + } } blockquote {