Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix issues with inputs on iOS #1241

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/css/src/common/hide-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
appearance: none;
margin-block: 0;
margin-inline: 0;
opacity: 0%; /* to hide native input field in older iOS */
width: 0; // Make sure the input doesn’t take up space on iOS
}
5 changes: 2 additions & 3 deletions packages/css/src/components/date-input/date-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
@import "../../common/text-rendering";

@mixin reset {
// Reset native appearance, this causes issues on iOS and Android devices
-webkit-appearance: none;
appearance: none;
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
Expand Down
3 changes: 2 additions & 1 deletion packages/css/src/components/file-input/file-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
}

.ams-file-input::file-selector-button {
appearance: none; // Reset default appearance on iOS devices
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
background-color: var(--ams-file-input-file-selector-button-background-color);
box-shadow: var(--ams-file-input-file-selector-button-box-shadow);
color: var(--ams-file-input-file-selector-button-color);
Expand Down
5 changes: 2 additions & 3 deletions packages/css/src/components/search-field/search-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
}

@mixin reset-input {
// Reset native appearance, this causes issues on iOS and Android devices
-webkit-appearance: none;
appearance: none;
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

@mixin reset {
appearance: none;
appearance: none; // Reset native appearance to hide default chevron
VincentSmedinga marked this conversation as resolved.
Show resolved Hide resolved
border: 0;
border-radius: 0; // Reset rounded borders for Safari on MacOS
}
Expand Down
5 changes: 4 additions & 1 deletion packages/css/src/components/text-area/text-area.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
@import "../../common/text-rendering";

@mixin reset {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
margin-block: 0;
}

.ams-text-area {
background-color: var(--ams-text-area-background-color);
border: 0;
box-shadow: var(--ams-text-area-box-shadow);
color: var(--ams-text-area-color);
font-family: var(--ams-text-area-font-family);
Expand Down
5 changes: 4 additions & 1 deletion packages/css/src/components/text-input/text-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
@import "../../common/text-rendering";

@mixin reset {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
margin-block: 0;
}

.ams-text-input {
background-color: var(--ams-text-input-background-color);
border: 0;
box-shadow: var(--ams-text-input-box-shadow);
color: var(--ams-text-input-color);
font-family: var(--ams-text-input-font-family);
Expand Down
5 changes: 2 additions & 3 deletions packages/css/src/components/time-input/time-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
@import "../../common/text-rendering";

@mixin reset {
// Reset native appearance, this causes issues on iOS and Android devices
-webkit-appearance: none;
appearance: none;
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
Expand Down
Loading