Permalink
Browse files

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...
1 parent 2246d52 commit 902df97f369f86b670d2254c9a54d05fd400069a Wilson Miner committed Nov 16, 2008
View
2 django/contrib/admin/media/css/changelists.css
@@ -1,5 +1,3 @@
-@import url('base.css');
-
/* CHANGELISTS */
#changelist {
View
2 django/contrib/admin/media/css/dashboard.css
@@ -1,5 +1,3 @@
-@import url('base.css');
-
/* DASHBOARD */
.dashboard .module table th {
View
1 django/contrib/admin/media/css/forms.css
@@ -1,4 +1,3 @@
-@import url('base.css');
@import url('widgets.css');
/* FORM ROWS */
View
2 django/contrib/admin/media/css/login.css
@@ -1,5 +1,3 @@
-@import url('base.css');
-
/* LOGIN FORM */
body.login {
View
6 django/contrib/admin/templates/admin/base.html
@@ -2,10 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
-<![if gte IE 6]><link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" /><![endif]>
+<![if gte IE 6]><!-- Block all styles from IE5 and lower -->
+<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
+{% block extrastyle %}{% endblock %}
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
-{% block extrastyle %}{% endblock %}
+<![endif]>
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
View
2 django/contrib/admin/templates/admin/change_form.html
@@ -6,7 +6,7 @@
{{ media }}
{% endblock %}
-{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
View
2 django/contrib/admin/templates/admin/change_list.html
@@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n %}
-{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />{% endblock %}
{% block bodyclass %}change-list{% endblock %}
View
2 django/contrib/admin/templates/admin/index.html
@@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
-{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %}
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
{% block coltype %}colMS{% endblock %}
View
2 django/contrib/admin/templates/admin/login.html
@@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
-{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %}
+{% block extrastyle %}{% load adminmedia %}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/login.css" />{% endblock %}
{% block bodyclass %}login{% endblock %}

0 comments on commit 902df97

Please sign in to comment.