Opened 9 months ago
Closed 9 months ago
#35195 closed Cleanup/optimization (fixed)
Remove type="text/css" from <style>.
Reported by: | Cosmic Process | Owned by: | Cosmic Process |
---|---|---|---|
Component: | Core (Other) | 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
The attribute type="text/css"
is unnecessary for <style>
and <link>
tags in modern HTML. While the commit https://github.com/django/django/commit/7c4f3965098baad2396e24501e09237425a7bd6f removed many type="text/css"
attributes, there are still some of them.
$ git grep 'type="text/css"' django/contrib/admindocs/templates/admin_doc/model_detail.html:<style type="text/css"> django/views/templates/csrf_403.html: <style type="text/css"> django/views/templates/technical_404.html: <style type="text/css"> django/views/templates/technical_500.html: <style type="text/css"> docs/releases/4.1.txt:* The ``type="text/css"`` attribute is no longer included in ``<link>`` tags tests/utils_tests/files/strip_tags1.html: <link href="https://a248.e.akamai.net/assets.github.com/assets/github-f70e4783e00fd4884a9e5e651a43933c9881caa8.css" media="all" rel="stylesheet" type="text/css" /> tests/utils_tests/files/strip_tags1.html: <link href="https://a248.e.akamai.net/assets.github.com/assets/github2-0d31290d073dea4d8671e2b8c747629aeb074034.css" media="all" rel="stylesheet" type="text/css" />
Change History (7)
comment:1 by , 9 months ago
Component: | Uncategorized → Core (Other) |
---|---|
Summary: | Remove all type="text/css" attributes → Remove type="text/css" from <style>. |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 9 months ago
Sure. I didn't mean all of them anyway. I wanted to keep the output of the command intact.
comment:3 by , 9 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 9 months ago
Has patch: | set |
---|
comment:6 by , 9 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Replying to cosmicproc:
Removing
text/css
from release notes and tests would be incorrect, so only these 4 cases are valid:Would you like to prepare a patch?