Removed the hidden import rules in the contrib.admin stylesheets. Each 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
This commit is contained in:
Wilson Miner 2008-11-16 00:08:48 +00:00
parent 2246d526b1
commit 902df97f36
9 changed files with 8 additions and 13 deletions

View File

@ -1,5 +1,3 @@
@import url('base.css');
/* CHANGELISTS */
#changelist {

View File

@ -1,5 +1,3 @@
@import url('base.css');
/* DASHBOARD */
.dashboard .module table th {

View File

@ -1,4 +1,3 @@
@import url('base.css');
@import url('widgets.css');
/* FORM ROWS */

View File

@ -1,5 +1,3 @@
@import url('base.css');
/* LOGIN FORM */
body.login {

View File

@ -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 File

@ -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 File

@ -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 File

@ -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 File

@ -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 %}