-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(select): text does not overlap icon (#27125)
<!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> <!-- Issues are required for both bug fixes and features. --> Issue URL: resolves #27081 When using stacked/floating labels the icon needs to be centered with the entire component, not just the placeholder/selected text. As a result, we set `position: absolute`. However, this causes the long selected texts to overlap the icon. This is not happening with non-stacked/floating labels because the icon is `position: relative` and follows the normal document flow. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Moved the icon sizes to sass variables - Added code to set the .native-wrapper width to 100% minus the width of the icon _and_ the additional margin that .select-icon adds ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: ionitron <[email protected]> Co-authored-by: Brandy Carney <[email protected]>
- Loading branch information
1 parent
063cd9f
commit f6ff206
Showing
55 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-8.52 KB
...e.ts-snapshots/select-label-floating-long-label-ios-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-4.15 KB
....ts-snapshots/select-label-floating-long-label-ios-ltr-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-8.61 KB
...e.ts-snapshots/select-label-floating-long-label-ios-ltr-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-8.58 KB
...e.ts-snapshots/select-label-floating-long-label-ios-rtl-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-4.15 KB
....ts-snapshots/select-label-floating-long-label-ios-rtl-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-8.65 KB
...e.ts-snapshots/select-label-floating-long-label-ios-rtl-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-7.78 KB
...2e.ts-snapshots/select-label-floating-long-label-md-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-2.89 KB
...e.ts-snapshots/select-label-floating-long-label-md-ltr-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-7.22 KB
...2e.ts-snapshots/select-label-floating-long-label-md-ltr-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-7.75 KB
...2e.ts-snapshots/select-label-floating-long-label-md-rtl-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-2.86 KB
...e.ts-snapshots/select-label-floating-long-label-md-rtl-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-7.18 KB
...2e.ts-snapshots/select-label-floating-long-label-md-rtl-Mobile-Safari-linux.png
Binary file not shown.
Binary file added
BIN
+9.86 KB
...2e.ts-snapshots/select-label-floating-long-text-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.89 KB
...e.ts-snapshots/select-label-floating-long-text-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.36 KB
...2e.ts-snapshots/select-label-floating-long-text-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.89 KB
...2e.ts-snapshots/select-label-floating-long-text-ios-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...e.ts-snapshots/select-label-floating-long-text-ios-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.41 KB
...2e.ts-snapshots/select-label-floating-long-text-ios-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.61 KB
...e2e.ts-snapshots/select-label-floating-long-text-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.55 KB
...2e.ts-snapshots/select-label-floating-long-text-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8 KB
...e2e.ts-snapshots/select-label-floating-long-text-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.6 KB
...e2e.ts-snapshots/select-label-floating-long-text-md-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.2 KB
...2e.ts-snapshots/select-label-floating-long-text-md-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.96 KB
...e2e.ts-snapshots/select-label-floating-long-text-md-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-8.52 KB
...2e.ts-snapshots/select-label-stacked-long-label-ios-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-4.15 KB
...e.ts-snapshots/select-label-stacked-long-label-ios-ltr-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-8.61 KB
...2e.ts-snapshots/select-label-stacked-long-label-ios-ltr-Mobile-Safari-linux.png
Diff not rendered.
Binary file removed
BIN
-8.58 KB
...2e.ts-snapshots/select-label-stacked-long-label-ios-rtl-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-4.15 KB
...e.ts-snapshots/select-label-stacked-long-label-ios-rtl-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-8.65 KB
...2e.ts-snapshots/select-label-stacked-long-label-ios-rtl-Mobile-Safari-linux.png
Diff not rendered.
Binary file removed
BIN
-7.78 KB
...e2e.ts-snapshots/select-label-stacked-long-label-md-ltr-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-2.89 KB
...2e.ts-snapshots/select-label-stacked-long-label-md-ltr-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-7.22 KB
...e2e.ts-snapshots/select-label-stacked-long-label-md-ltr-Mobile-Safari-linux.png
Diff not rendered.
Binary file removed
BIN
-7.75 KB
...e2e.ts-snapshots/select-label-stacked-long-label-md-rtl-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-2.86 KB
...2e.ts-snapshots/select-label-stacked-long-label-md-rtl-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-7.18 KB
...e2e.ts-snapshots/select-label-stacked-long-label-md-rtl-Mobile-Safari-linux.png
Diff not rendered.
Binary file added
BIN
+9.86 KB
...e2e.ts-snapshots/select-label-stacked-long-text-ios-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.89 KB
...2e.ts-snapshots/select-label-stacked-long-text-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.36 KB
...e2e.ts-snapshots/select-label-stacked-long-text-ios-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.89 KB
...e2e.ts-snapshots/select-label-stacked-long-text-ios-rtl-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.08 KB
...2e.ts-snapshots/select-label-stacked-long-text-ios-rtl-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.41 KB
...e2e.ts-snapshots/select-label-stacked-long-text-ios-rtl-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.61 KB
....e2e.ts-snapshots/select-label-stacked-long-text-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.55 KB
...e2e.ts-snapshots/select-label-stacked-long-text-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+8 KB
....e2e.ts-snapshots/select-label-stacked-long-text-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.6 KB
....e2e.ts-snapshots/select-label-stacked-long-text-md-rtl-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.2 KB
...e2e.ts-snapshots/select-label-stacked-long-text-md-rtl-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.96 KB
....e2e.ts-snapshots/select-label-stacked-long-text-md-rtl-Mobile-Safari-linux.png
Oops, something went wrong.