﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35008	Minifiers break django contrib admins UI	Raphaël Stefanini	Mariusz Felisiak	"I have been using a HTML minifier on django's output and it breaks some UI elements in django's shipped admin by stripping some default attributes, mainly by removing `type=""text""` on inputs, since it is a default html input attribute.
This affect anyone who would use a minifier either as middleware or as CDN feature, and the logic is clear, you don't have to keep default html attribute.
The problem is that django repo CSS rules don't take that in account and it assume for all attributes to be present.
Django would need to have a CSS rule stating `input:not([type]), input[type=text]` instead of just `input[type=text]` for the minified version to match the original UI.

I have found only three places in django.contrib.admin that would need a CSS update, so I believe it is an easy fix:

{{{
// base.css:485
input:not([type]),
...
{
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 6px;
    margin-top: 0;
    color: var(--body-fg);
    background-color: var(--body-bg);
}
// base.css:495
input:not([type]):focus,
...
{
    border-color: var(--body-quiet-color);
}
// responsive.css:177
.form-row input:not([type]),
...
{
    box-sizing: border-box;
    margin: 0;
    padding: 6px 8px;
    min-height: 2.25rem;
    font-size: 0.875rem;
}
}}}

I create this ticket after having discussed the issue here https://github.com/adamchainz/django-minify-html/issues/165"	Cleanup/optimization	closed	contrib.admin	4.2	Normal	fixed	UI admin minified css		Ready for checkin	1	0	0	0	1	1
