Opened 3 hours ago
#36659 new Bug
Re-enable custom height for flatpage content field in admin
Reported by: | Baptiste Mispelon | Owned by: | |
---|---|---|---|
Component: | contrib.admin | Version: | 5.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The admin's forms.css
file contains this rule [1]:
.flatpages-flatpage #id_content { height: 40.2em; }
The purpose of this rule (I'm guessing) is to make the FlatPage.content
field taller on the add/change form, because this field typically contains a lot of text. This appears to be basically as old as the admin itself, and was added in dd5320d1d56ca7603747dd68871e72eee99d9e67 (where it started as body.core-flatfile #id_content { height: 400px; }
).
However this rule doesn't currently do anything, because the .flatpages-flatpage
selector doesn't match anything.
This appears to be a regression that was introduced in release 1.6 with commit bb145e2c47d71b7f68280c00ced727442d2effa2 wich effectively changed the body class from flatpages-flatpage
to app-flatpages model-flatpage
.
[1] https://github.com/django/django/blob/1167cd1d639c3fee69dbdef351d31e8a17d1fedf/django/contrib/admin/static/admin/css/forms.css#L360-L362