#29248: Model field names can conflict with field-box CSS class in Admin
-----------------------------------------+------------------------
               Reporter:  Phil Gyford    |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  contrib.admin  |        Version:  2.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  0              |
-----------------------------------------+------------------------
 In Admin edit screens, fields are given a CSS class with their field name.
 e.g. A model field called `title` will have its input field, label, etc,
 surrounded by a div like: `<div class="form-row field-title">`.

 However there is a `field-box` class used in admin's `forms.css`
 stylesheet:

 {{{
 fieldset .field-box {
     float: left;
     margin-right: 20px;
 }
 }}}

 So, if you have a model with a field called `box`, then when it's
 displayed on an Admin edit screen it is floated left and the next field
 appears to its right:

 [[Image(https://i.imgur.com/wYuausq.png)]]

 I ''think'' that `field-box` is the only such potential conflict in
 `forms.css`. I guess it should be renamed to something that does not start
 with `field-`?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29248>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.c82051d35bdb4ccdc88025938b9a71aa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to