Commit 6fa6c772 authored by webchick's avatar webchick

Issue #1968360 by effulgentsia: Remove per-region block markup.

parent 23c27a88
......@@ -553,7 +553,6 @@ function template_preprocess_block(&$variables) {
// Add default class for block content.
$variables['content_attributes']['class'][] = 'content';
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region;
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module;
// Hyphens (-) and underscores (_) play a special role in theme suggestions.
// Theme suggestions should only contain underscores, because within
......
......@@ -54,7 +54,7 @@ function testBlockThemeHookSuggestions() {
// Test adding a class to the block content.
$variables['content_attributes']['class'][] = 'test-class';
template_preprocess_block($variables);
$this->assertEqual($variables['theme_hook_suggestions'], array('block__footer', 'block__system', 'block__system_menu_block', 'block__system_menu_block__menu_admin', 'block__machinename'));
$this->assertEqual($variables['theme_hook_suggestions'], array('block__system', 'block__system_menu_block', 'block__system_menu_block__menu_admin', 'block__machinename'));
$this->assertEqual($variables['content_attributes']['class'], array('test-class', 'content'), 'Default .content class added to block content_attributes_array');
}
......
......@@ -110,16 +110,6 @@ function bartik_process_maintenance_page(&$variables) {
}
}
/**
* Implements hook_preprocess_HOOK() for block.tpl.php.
*/
function bartik_preprocess_block(&$variables) {
// In the header and footer regions visually hide block titles.
if ($variables['block']->region == 'header' || $variables['block']->region == 'footer') {
$variables['title_attributes']['class'][] = 'element-invisible';
}
}
/**
* Implements theme_menu_tree().
*/
......
......@@ -344,6 +344,13 @@ h1#site-name {
margin: 0 10px;
padding: 0;
}
.region-header .block > h2 {
/* @extend .element-invisible */
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;
}
.region-header .block .content {
margin: 0;
padding: 0;
......@@ -877,6 +884,13 @@ ul.links {
padding: 0.5em 0;
margin-top: 0;
}
#footer .block > h2 {
/* @extend .element-invisible */
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;
}
#footer .block h2 {
margin: 0;
}
......
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