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

Tweak and consolidate date picker #2121

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Tweak and consolidate date picker #2121

merged 3 commits into from
Nov 21, 2024

Conversation

anselmbradford
Copy link
Member

@anselmbradford anselmbradford commented Nov 20, 2024

Merge two date picker examples we had, and make a regular and full width example.

Changes

  • Tweak and consolidate date picker examples

Testing

  1. Check out the examples on across major browsers and iOS simulators https://deploy-preview-2121--cfpb-design-system.netlify.app/design-system/components/date-picker

Copy link

netlify bot commented Nov 20, 2024

Thanks for the improvements! Browse a preview of your changes using the link below.

Name Link
🔨 Latest commit c41101f
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system/deploys/673f593e0a2a120008bef615
😎 Deploy Preview https://deploy-preview-2121--cfpb-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -35,6 +35,10 @@ textarea {
input[type='date'] {
appearance: textfield;
display: revert;

&.a-text-input--full {
-webkit-min-logical-width: calc(100% - 16px);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not min-width?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok ok I went a min-width approach in c41101f

I realized the calc(100% - 16px) works on iOS, but then it is shorter on desktop browsers. Instead I set a min width/height to what it would be if the appearance was a textfield, and then set the appearance to none. This appears to look good across iOS Safari, desktop Safari, FF, and Chrome.

@contolini contolini self-requested a review November 21, 2024 19:56
@anselmbradford anselmbradford merged commit 4122c62 into main Nov 21, 2024
8 checks passed
@anselmbradford anselmbradford deleted the ans_ios_tweak branch November 21, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants