kevinmickey / django-prettyjson

Enables pretty JSON viewer in Django forms, admin, or templates
BSD 3-Clause "New" or "Revised" License
139 stars 21 forks source link

Does not align with other fields #14

Open rvernica opened 6 years ago

rvernica commented 6 years ago

It does not seem to align with the rest of the fields on the Admin form. Instead it aligns itself from the left of the form. It might be related to changes in Django. align

robinchow commented 5 years ago

The latest version of django-prettyjson (I'm currently using Django 2.1 and django-prettyjson 0.4.1) seems to fix this.

bctiemann commented 3 years ago

This is happening for me with django-prettyjson 0.4.1 and Django 3.1. I'm using Safari (14.1.1) however, and it seems to be related to -webkit-appearance in the django admin's responsive.css (Chrome doesn't have this problem).

Screen Shot 2021-07-07 at 8 46 00 PM

If I disable -webkit-appearance: none on the button, it fixes the issue. (It also turns off the weird non-native styling.)

edit: If I add this to prettyjson.css, it fixes it:

.jsonwidget button {
  -webkit-appearance: button;
}