Commit c2c63b94 authored by Dries's avatar Dries

- Patch #885228 by sun, Jacine, mverbaar: CSS Files are in major need of clean up.

parent 35e7c83d
......@@ -77,12 +77,13 @@ function _drupal_maintenance_theme() {
// These are usually added from system_init() -except maintenance.css.
// When the database is inactive it's not called so we add it here.
drupal_add_css(drupal_get_path('module', 'system') . '/system.css');
drupal_add_css(drupal_get_path('module', 'system') . '/system-behavior.css');
drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css');
drupal_add_css(drupal_get_path('module', 'system') . '/system-messages.css');
drupal_add_css(drupal_get_path('module', 'system') . '/maintenance.css');
drupal_add_css(drupal_get_path('module', 'system') . '/admin.css');
$path = drupal_get_path('module', 'system');
drupal_add_css($path . '/system.base.css');
drupal_add_css($path . '/system.admin.css');
drupal_add_css($path . '/system.menus.css');
drupal_add_css($path . '/system.messages.css');
drupal_add_css($path . '/system.theme.css');
drupal_add_css($path . '/system.maintenance.css');
}
/**
......
......@@ -44,3 +44,11 @@
input#edit-filters-filter-html-settings-allowed-html {
width: 100%;
}
.tips {
margin-top: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
font-size: 0.9em;
}
......@@ -706,14 +706,14 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
drupal_add_css(drupal_get_path('module', 'simpletest') . '/simpletest.css');
// A few system CSS files, ordered in a strange way.
$system_path = drupal_get_path('module', 'system');
drupal_add_css($system_path . '/system-behavior.css', array('weight' => CSS_SYSTEM));
drupal_add_css($system_path . '/system.css', array('weight' => CSS_SYSTEM - 10));
drupal_add_css($system_path . '/system-menus.css', array('weight' => CSS_SYSTEM));
drupal_add_css($system_path . '/system.menus.css', array('weight' => CSS_SYSTEM));
drupal_add_css($system_path . '/system.base.css', array('weight' => CSS_SYSTEM - 10));
drupal_add_css($system_path . '/system.theme.css', array('weight' => CSS_SYSTEM));
$expected = array(
$system_path . '/system.css',
$system_path . '/system-behavior.css',
$system_path . '/system-menus.css',
$system_path . '/system.base.css',
$system_path . '/system.menus.css',
$system_path . '/system.theme.css',
drupal_get_path('module', 'simpletest') . '/simpletest.css',
);
......@@ -735,35 +735,39 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
* Test CSS override.
*/
function testRenderOverride() {
drupal_add_css(drupal_get_path('module', 'system') . '/system.css');
drupal_add_css(drupal_get_path('module', 'simpletest') . '/tests/system.css');
$system = drupal_get_path('module', 'system');
$simpletest = drupal_get_path('module', 'simpletest');
drupal_add_css($system . '/system.base.css');
drupal_add_css($simpletest . '/tests/system.base.css');
// The dummy stylesheet should be the only one included.
$styles = drupal_get_css();
$this->assert(strpos($styles, drupal_get_path('module', 'simpletest') . '/tests/system.css') !== FALSE, t('The overriding CSS file is output.'));
$this->assert(strpos($styles, drupal_get_path('module', 'system') . '/system.css') === FALSE, t('The overriden CSS file is not output.'));
$this->assert(strpos($styles, $simpletest . '/tests/system.base.css') !== FALSE, t('The overriding CSS file is output.'));
$this->assert(strpos($styles, $system . '/system.base.css') === FALSE, t('The overridden CSS file is not output.'));
drupal_add_css(drupal_get_path('module', 'simpletest') . '/tests/system.css');
drupal_add_css(drupal_get_path('module', 'system') . '/system.css');
drupal_add_css($simpletest . '/tests/system.base.css');
drupal_add_css($system . '/system.base.css');
// The standard stylesheet should be the only one included.
$styles = drupal_get_css();
$this->assert(strpos($styles, drupal_get_path('module', 'system') . '/system.css') !== FALSE, t('The overriding CSS file is output.'));
$this->assert(strpos($styles, drupal_get_path('module', 'simpletest') . '/tests/system.css') === FALSE, t('The overriden CSS file is not output.'));
$this->assert(strpos($styles, $system . '/system.base.css') !== FALSE, t('The overriding CSS file is output.'));
$this->assert(strpos($styles, $simpletest . '/tests/system.base.css') === FALSE, t('The overridden CSS file is not output.'));
}
/**
* Tests Locale module's CSS Alter to include RTL overrides.
*/
function testAlter() {
// Switch the language to a right to left language and add system.css.
// Switch the language to a right to left language and add system.base.css.
global $language;
$language->direction = LANGUAGE_RTL;
drupal_add_css(drupal_get_path('module', 'system') . '/system.css');
$path = drupal_get_path('module', 'system');
drupal_add_css($path . '/system.base.css');
// Check to see if system-rtl.css was also added.
// Check to see if system.base-rtl.css was also added.
$styles = drupal_get_css();
$this->assert(strpos($styles, drupal_get_path('module', 'system') . '/system-rtl.css') !== FALSE, t('CSS is alterable as right to left overrides are added.'));
$this->assert(strpos($styles, $path . '/system.base-rtl.css') !== FALSE, t('CSS is alterable as right to left overrides are added.'));
// Change the language back to left to right.
$language->direction = LANGUAGE_LTR;
......
......@@ -1830,13 +1830,13 @@ function _system_filetransfer_backend_form_common() {
function system_init() {
$path = drupal_get_path('module', 'system');
// Add the CSS for this module.
drupal_add_css($path . '/system.base.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit' || arg(2) == 'delete'))) {
drupal_add_css($path . '/admin.css', array('weight' => CSS_SYSTEM));
drupal_add_css($path . '/system.admin.css', array('weight' => CSS_SYSTEM));
}
drupal_add_css($path . '/system.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system-behavior.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system-menus.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system-messages.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system.menus.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system.messages.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
drupal_add_css($path . '/system.theme.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
// Ignore slave database servers for this request.
//
......
......@@ -4,6 +4,26 @@
padding-left: 0;
padding-right: 1.5em;
}
/**
* Password strength indicator.
*/
input.password-field {
margin-left: 10px;
margin-right: 0;
}
input.password-confirm {
margin-left: 10px;
margin-right: 0;
}
.password-strength-title {
float: right;
}
.password-parent {
float: right;
}
/* Generated by user.module but used by profile.module: */
.profile .user-picture {
float: left;
margin: 0 0 1em 1em;
......
......@@ -27,6 +27,64 @@
margin-right: 1em;
}
/**
* Password strength indicator.
*/
.password-strength {
width: 17em;
float: right; /* LTR */
margin-top: 1.4em;
}
.password-strength-title {
display: inline;
}
.password-strength-text {
float: right; /* LTR */
font-weight: bold;
}
.password-indicator {
background-color: #C4C4C4;
height: 0.3em;
width: 100%;
}
.password-indicator div {
height: 100%;
width: 0%;
background-color: #47C965;
}
input.password-confirm,
input.password-field {
width: 16em;
margin-bottom: 0.4em;
}
div.password-confirm {
display: inline;
padding-left: 1em;
}
div.form-item div.password-suggestions {
padding: 0.2em 0.5em;
margin: 0.7em 0;
width: 38.5em;
border: 1px solid #B4B4B4;
}
div.password-suggestions ul {
margin-bottom: 0;
}
.password-parent {
margin: 0;
width: 34.3em;
}
/**
* Password confirmation checker.
*/
.confirm-parent {
margin: 0;
}
div.password-confirm {
visibility: hidden;
}
/* Generated by user.module but used by profile.module: */
.profile {
clear: both;
......
......@@ -30,6 +30,9 @@ blockquote:after {
ul.tips {
padding: 0 1.25em 0 0;
}
.block ul {
padding: 0 1em 0.25em 0;
}
/* ------------------ Header ------------------ */
......
......@@ -180,6 +180,7 @@ tr.even {
.block ul {
margin: 0;
padding: 0 0 0.25em 1em; /* LTR */
}
ul.contextual-links,
.item-list .pager {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment