diff --git a/.changeset/olive-frogs-draw.md b/.changeset/olive-frogs-draw.md new file mode 100644 index 00000000000..8f767b393a3 --- /dev/null +++ b/.changeset/olive-frogs-draw.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Fixed `TextField` zoom on focus due to font-size below 16px diff --git a/polaris-react/src/components/Picker/components/SearchField/SearchField.module.css b/polaris-react/src/components/Picker/components/SearchField/SearchField.module.css index 52a2dc0ff74..be2478e6380 100644 --- a/polaris-react/src/components/Picker/components/SearchField/SearchField.module.css +++ b/polaris-react/src/components/Picker/components/SearchField/SearchField.module.css @@ -3,4 +3,11 @@ padding: var(--p-space-100) 0; outline: none; border: none; + font-size: var(--p-font-size-400); + line-height: var(--p-font-line-height-600); + + @media (--p-breakpoints-md-up) { + font-size: var(--p-font-size-325); + line-height: var(--p-font-line-height-500); + } } diff --git a/polaris-react/src/components/Select/Select.module.css b/polaris-react/src/components/Select/Select.module.css index 6814079cfe5..e7aa0cb9296 100644 --- a/polaris-react/src/components/Select/Select.module.css +++ b/polaris-react/src/components/Select/Select.module.css @@ -68,6 +68,22 @@ min-height: var(--pg-control-height); padding: var(--p-space-150) var(--p-space-200) var(--p-space-150) var(--p-space-300); + + font-size: var(--p-font-size-400); + line-height: var(--p-font-line-height-600); + + @media (--p-breakpoints-md-up) { + line-height: var(--p-font-line-height-500); + font-size: var(--p-font-size-325); + } + + @media (--p-breakpoints-md-down) { + /* stylelint-disable-next-line selector-max-combinators, selector-max-type -- generated by polaris-migrator DO NOT COPY */ + div > span { + font-size: var(--p-font-size-400); + line-height: var(--p-font-line-height-500); + } + } } .SelectedOption { @@ -87,9 +103,9 @@ .Input { /* Even though the input is invisible, text styles apply to the options menu */ - font-size: var(--p-font-size-325); + font-size: var(--p-font-size-400); font-weight: var(--p-font-weight-regular); - line-height: var(--p-font-line-height-500); + line-height: var(--p-font-line-height-600); /* Safari requires the font-family to be added to the