From 7c4f3965098baad2396e24501e09237425a7bd6f Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 21 Jan 2022 15:46:37 +0100 Subject: Stopped including type="text/css" attributes for CSS link tags. --- docs/_theme/djangodocs/layout.html | 2 +- docs/intro/tutorial06.txt | 2 +- docs/ref/templates/builtins.txt | 2 +- docs/releases/4.1.txt | 3 +++ docs/topics/forms/media.txt | 37 +++++++++++++++++++++---------------- 5 files changed, 27 insertions(+), 19 deletions(-) (limited to 'docs') diff --git a/docs/_theme/djangodocs/layout.html b/docs/_theme/djangodocs/layout.html index c8770173aa..487c2b4922 100644 --- a/docs/_theme/djangodocs/layout.html +++ b/docs/_theme/djangodocs/layout.html @@ -72,7 +72,7 @@ {% endif %} {%- if include_console_assets -%} - + {%- endif -%} {% endblock %} diff --git a/docs/intro/tutorial06.txt b/docs/intro/tutorial06.txt index c3df546cae..f0087f8905 100644 --- a/docs/intro/tutorial06.txt +++ b/docs/intro/tutorial06.txt @@ -74,7 +74,7 @@ Next, add the following at the top of ``polls/templates/polls/index.html``: {% load static %} - + The ``{% static %}`` template tag generates the absolute URL of static files. diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 1fcfa1fa88..08c1ca47e2 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -2637,7 +2637,7 @@ It is also able to consume standard context variables, e.g. assuming a ``user_stylesheet`` variable is passed to the template:: {% load static %} - + If you'd like to retrieve a static URL without displaying it, you can use a slightly different call:: diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 8a531039ef..cf4eb07b35 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -366,6 +366,9 @@ Miscellaneous :attr:`~django.contrib.admin.ModelAdmin.inlines` attributes now default to an empty tuple rather than an empty list to discourage unintended mutation. +* The ``type="text/css"`` attribute is no longer included in ```` tags + for CSS :doc:`form media `. + .. _deprecated-features-4.1: Features deprecated in 4.1 diff --git a/docs/topics/forms/media.txt b/docs/topics/forms/media.txt index 34bc70dcc5..6ca7c66fde 100644 --- a/docs/topics/forms/media.txt +++ b/docs/topics/forms/media.txt @@ -71,7 +71,7 @@ can be retrieved through this property:: >>> w = CalendarWidget() >>> print(w.media) - + @@ -114,9 +114,14 @@ requirements:: If this last CSS definition were to be rendered, it would become the following HTML:: - - - + + + + +.. versionchanged:: 4.1 + + In older versions, the ``type="text/css"`` attribute is included in CSS + links. ``js`` ------ @@ -145,8 +150,8 @@ example above:: >>> w = FancyCalendarWidget() >>> print(w.media) - - + + @@ -165,7 +170,7 @@ an ``extend=False`` declaration to the ``Media`` declaration:: >>> w = FancyCalendarWidget() >>> print(w.media) - + If you require even more control over inheritance, define your assets using a @@ -228,7 +233,7 @@ was ``None``:: >>> w = CalendarWidget() >>> print(w.media) - + @@ -236,7 +241,7 @@ But if :setting:`STATIC_URL` is ``'http://static.example.com/'``:: >>> w = CalendarWidget() >>> print(w.media) - + @@ -245,7 +250,7 @@ Or if :mod:`~django.contrib.staticfiles` is configured using the >>> w = CalendarWidget() >>> print(w.media) - + @@ -268,12 +273,12 @@ operator to filter out a medium of interest. For example:: >>> w = CalendarWidget() >>> print(w.media) - + >>> print(w.media['css']) - + When you use the subscript operator, the value that is returned is a new ``Media`` object -- but one that only contains the media of interest. @@ -300,7 +305,7 @@ specified by both:: >>> w1 = CalendarWidget() >>> w2 = OtherWidget() >>> print(w1.media + w2.media) - + @@ -356,7 +361,7 @@ are part of the form:: >>> f = ContactForm() >>> f.media - + @@ -375,8 +380,8 @@ CSS for form layout -- add a ``Media`` declaration to the form:: >>> f = ContactForm() >>> f.media - - + + -- cgit v1.3