Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed the hidden import rules in the contrib.admin stylesheets. Eac…

…h individual stylesheet is now linked to explicitly from the template where it's used (in the extrastyle block), with the exception of widgets.css, which is imported by forms.css, but still available separately for reuse. Also moved the override stylesheets (IE and RTL) below the extrastyle block and all styles within the conditional comment which blocks CSS from IE5 and lower.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 902df97f369f86b670d2254c9a54d05fd400069a 1 parent 2246d52
authored November 16, 2008
2  django/contrib/admin/media/css/changelists.css
... ...
@@ -1,5 +1,3 @@
1  
-@import url('base.css');
2  
-
3 1
 /* CHANGELISTS */
4 2
 
5 3
 #changelist {
2  django/contrib/admin/media/css/dashboard.css
... ...
@@ -1,5 +1,3 @@
1  
-@import url('base.css');
2  
-
3 1
 /* DASHBOARD */
4 2
 
5 3
 .dashboard .module table th {
1  django/contrib/admin/media/css/forms.css
... ...
@@ -1,4 +1,3 @@
1  
-@import url('base.css');
2 1
 @import url('widgets.css');
3 2
 
4 3
 /* FORM ROWS */
2  django/contrib/admin/media/css/login.css
... ...
@@ -1,5 +1,3 @@
1  
-@import url('base.css');
2  
-
3 1
 /* LOGIN FORM */
4 2
 
5 3
 body.login {
6  django/contrib/admin/templates/admin/base.html
@@ -2,10 +2,12 @@
2 2
 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
3 3
 <head>
4 4
 <title>{% block title %}{% endblock %}</title>
5  
-<![if gte IE 6]><link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" /><![endif]>
  5
+<![if gte IE 6]><!-- Block all styles from IE5 and lower -->
  6
+<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
  7
+{% block extrastyle %}{% endblock %}
6 8
 <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
7 9
 {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
8  
-{% block extrastyle %}{% endblock %}
  10
+<![endif]>
9 11
 {% block extrahead %}{% endblock %}
10 12
 {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
11 13
 </head>
2  django/contrib/admin/templates/admin/change_form.html
@@ -6,7 +6,7 @@
6 6
 {{ media }}
7 7
 {% endblock %}
8 8
 
9  
-{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}
  9
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
10 10
 
11 11
 {% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
12 12
 
2  django/contrib/admin/templates/admin/change_list.html
... ...
@@ -1,7 +1,7 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load adminmedia admin_list i18n %}
3 3
 
4  
-{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
  4
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />{% endblock %}
5 5
 
6 6
 {% block bodyclass %}change-list{% endblock %}
7 7
 
2  django/contrib/admin/templates/admin/index.html
... ...
@@ -1,7 +1,7 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 
4  
-{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %}
  4
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
5 5
 
6 6
 {% block coltype %}colMS{% endblock %}
7 7
 
2  django/contrib/admin/templates/admin/login.html
... ...
@@ -1,7 +1,7 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 
4  
-{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %}
  4
+{% block extrastyle %}{% load adminmedia %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/login.css" />{% endblock %}
5 5
 
6 6
 {% block bodyclass %}login{% endblock %}
7 7
 

0 notes on commit 902df97

Please sign in to comment.
Something went wrong with that request. Please try again.