1
0
mirror of https://github.com/django/django.git synced 2025-01-18 14:24:39 +00:00

Fixed #35008 -- Added CSS rule for <input> HTML tags with no type.

Minifiers remove the default (text) "type" attribute from "input" HTML
tags. This adds input:not([type]) to make the CSS stylesheet work the
same.
This commit is contained in:
Rapha S 2023-12-22 06:49:05 +02:00 committed by GitHub
parent 3ec15b0bcf
commit 5c6906cef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -482,8 +482,13 @@ textarea {
vertical-align: top; vertical-align: top;
} }
input[type=text], input[type=password], input[type=email], input[type=url], /*
input[type=number], input[type=tel], textarea, select, .vTextField { Minifiers remove the default (text) "type" attribute from "input" HTML tags.
Add input:not([type]) to make the CSS stylesheet work the same.
*/
input:not([type]), input[type=text], input[type=password], input[type=email],
input[type=url], input[type=number], input[type=tel], textarea, select,
.vTextField {
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
border-radius: 4px; border-radius: 4px;
padding: 5px 6px; padding: 5px 6px;
@ -492,9 +497,13 @@ input[type=number], input[type=tel], textarea, select, .vTextField {
background-color: var(--body-bg); background-color: var(--body-bg);
} }
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, /*
input[type=url]:focus, input[type=number]:focus, input[type=tel]:focus, Minifiers remove the default (text) "type" attribute from "input" HTML tags.
textarea:focus, select:focus, .vTextField:focus { Add input:not([type]) to make the CSS stylesheet work the same.
*/
input:not([type]):focus, input[type=text]:focus, input[type=password]:focus,
input[type=email]:focus, input[type=url]:focus, input[type=number]:focus,
input[type=tel]:focus, textarea:focus, select:focus, .vTextField:focus {
border-color: var(--body-quiet-color); border-color: var(--body-quiet-color);
} }

View File

@ -174,6 +174,11 @@ input[type="submit"], button {
font-size: 0.875rem; font-size: 0.875rem;
} }
/*
Minifiers remove the default (text) "type" attribute from "input" HTML
tags. Add input:not([type]) to make the CSS stylesheet work the same.
*/
.form-row input:not([type]),
.form-row input[type=text], .form-row input[type=text],
.form-row input[type=password], .form-row input[type=password],
.form-row input[type=email], .form-row input[type=email],