Opened 11 months ago

Last modified 10 months ago

#35382 closed Cleanup/optimization

Remove unused CSS style `.inline-related fieldset.module h3` — at Version 5

Reported by: Sarah Boyce Owned by: nobody
Component: contrib.admin Version: 5.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Natalia Bidart)

Currently, the CSS definition in forms.css for .inline-related fieldset.module h3 (which is at least 16 years old) is not being used in the Django code base. The only templates using the inline-related CSS class are contrib/admin/templates/admin/edit_inline/tabular.html and contrib/admin/templates/admin/edit_inline/stacked.html, and the former only uses h3 elements inside a div element which does not fulfill the CSS rule, and in the latter there is no usage of h3 at all.

Change History (7)

by Sarah Boyce, 11 months ago

Attachment: Color.png added

comment:1 by Sarah Boyce, 11 months ago

Description: modified (diff)

comment:2 by Natalia Bidart, 11 months ago

Component: Uncategorizedcontrib.admin
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Thank you Sarah for the report, it makes sense. I checked and the background color is at least 16 years old!

Do you have any concrete suggestion for the new font color?

by Sarah Boyce, 11 months ago

Attachment: suggestion.png added

comment:3 by Sarah Boyce, 11 months ago

Black #000?

comment:4 by Natalia Bidart, 11 months ago

Looks good! I checked the base.css and noticed we have a --body-fg: #333 which also seems like a good option. I would remove the bold though!

comment:5 by Natalia Bidart, 11 months ago

Description: modified (diff)
Summary: Low contrast background color for fieldset headings within inline formsetsRemove unused CSS style `.inline-related fieldset.module h3`

During a Discord conversation between Sarah and Ben, they realized that this low-contrast issue was only reproducible in the context of a PR fixing #35189, meaning that the issue is not present in main. So we are re-purposing this ticket to confirm and delete the unused CSS style .inline-related fieldset.module h3.

Note: See TracTickets for help on using tickets.
Back to Top