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 extra height on Safari date/time inputs #109

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

thecrypticace
Copy link
Contributor

On macOS Safari there is additional padding on some pseudo elements rendered inside of the input element's Shadow DOM. This removes that extra padding.

Fixes #95

@vercel
Copy link

vercel bot commented Mar 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-forms/CPdcBfD2BgyLb9Dpw2CSWRMb11R9
✅ Preview: https://tailwindcss-forms-git-fix-safari-datetime-e-4536a6-tailwindlabs.vercel.app

@thecrypticace thecrypticace changed the title Fix extra height on Safari datetime inputs Fix extra height on Safari date/time inputs Mar 1, 2022
@thecrypticace thecrypticace merged commit 99fbd47 into master Mar 1, 2022
@thecrypticace thecrypticace deleted the fix/safari-datetime-extra-height branch March 1, 2022 22:00
javierjulio added a commit to activeadmin/activeadmin that referenced this pull request Nov 22, 2023
This resolves a few issues with date inputs on Mac and iOS.

Defaults to left alignment (inherit).

tailwindlabs/tailwindcss-forms#144

Removes top and bottom padding on each of the datetime edit fields so with this the field will now match the same height as other inputs.

tailwindlabs/tailwindcss-forms#146

tailwindlabs/tailwindcss-forms#95

tailwindlabs/tailwindcss-forms#109
javierjulio added a commit to activeadmin/activeadmin that referenced this pull request Nov 22, 2023
This resolves a few issues with date inputs on Mac and iOS.

Defaults to left alignment (inherit).

tailwindlabs/tailwindcss-forms#144

Removes top and bottom padding on each of the datetime edit fields so with this the field will now match the same height as other inputs.

tailwindlabs/tailwindcss-forms#146

tailwindlabs/tailwindcss-forms#95

tailwindlabs/tailwindcss-forms#109
javierjulio added a commit to activeadmin/activeadmin that referenced this pull request Nov 30, 2023
* Add form errors and hints for UI dev

* Use antialiased text on body

* Add radio styles, set base for form controls

* Disable old form SCSS styles

* Add form styles

* Remove old fieldset inputs style

* Remove comment-form fieldset inputs style

This is no longer needed now since we removed the initial selector that added default padding.

* Increase input vertical spacing from 2.5 to 3

Since this adds top and bottom padding, this would be the equal spacing as using gap-6 but using spacing around the container. The overall spacing here is nicer and easier to call out the grouped inputs.

* Add explicit filters, use check_boxes

We need more variety for UI testing so some of these filters instead of select's use check boxes instead.

* Update filter form label style

Use the label class here so when using check boxes for a filter, this only applies to the filter label (group), not the label for each checkbox.

* Remove hard coded space from filter checkbox input

* Add filter form checkboxes style

* Use consistent Sign-In/Out language

This changes "Login" text to "Sign in". We have other places in the locale (links) where we actually use "Sign in" so we should stay consistent. Also apparent with "Log out" instead of "Sign out". Devise is consistent with using both "sign in/out" in its messages so we should be consistent as well.

* Disable old main structure styles

* Add default viewport meta tag for mobile support

Using latest value per HTML5 Boilerplate

https://github.com/h5bp/html5-boilerplate/blob/main/src/index.html

* Permit ngrok-free.app in dev hosts

This is helpful when testing the local dev app on a mobile device.

* Update date input pseudo styles

This resolves a few issues with date inputs on Mac and iOS.

Defaults to left alignment (inherit).

tailwindlabs/tailwindcss-forms#144

Removes top and bottom padding on each of the datetime edit fields so with this the field will now match the same height as other inputs.

tailwindlabs/tailwindcss-forms#146

tailwindlabs/tailwindcss-forms#95

tailwindlabs/tailwindcss-forms#109

* Increase footer top margin

* Remove panel from show page attributes_table

This is redundant with the page title above it. Common to see admins without this redundant title. This makes it better as a default and also to accommodate others that want to customize the layout.

* Devise pages and form actions styles

The form actions styles overlapped with the Devise page updates so I've applied these here. The login button (and for other Devise pages) is full width but because of Formtastic's semantic structure, the actions were laid out horizontally using flex. We only apply flex now if there are multiple actions. This way, on the Devise pages, the action can go full width.

* Update create-another checkbox styles

I prefer the original input+label layout but since Formtastic enforces the nested input within label which we already have styled (despite it being more problematic) this now looks much better.

* Remove columns component

I've decided that there is no point in keeping this and with the move to making the admin more mobile friendly, its just all around easier to replace these with div's and Tailwind classes for the right columns at the right viewport.

* Update blank_slate component

Now just a simple div component with a default CSS class. The content provided can be anything now and isn't built using html_safe, unless given in that form.

* Always use grid for page content container

Even if it's a single column, we always want to use grid here so we can apply the gap if a sidebar is added which is conditional.

* Update templates with Tailwind classes

* Set table actions default style

Easiest to just space these out at the container level for a suitable default.

* Update dropdown styles

This sets the list to a min full width which will at least match the size of the button if the list content is shorter which is often the case with our defaults.

Add a larger shadow to separate popup from content underneath.

Add text color styles to offset the default anchor color.

* Add filter with combined ransack predicate

* Disable more SASS partials that have been migrated

* Disable breadcrumbs SASS (migrated)

This includes an update to a feature test because it was using an old CSS class name for a negated test.

* Disable sortable handle

This no longer works since we removed jQuery UI. Our upgrade guide will call out that has-many-sortable isn't implemented in v4 and will require community contribution.

* Add has-many form styles

* Disable forms SASS partial completely

This has been fully migrated now. From here we can remove sass all together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

input type="date" is more height for other type, and calendar is too small on safari browser
1 participant