reverted: --- b/core/modules/block/block.module +++ a/core/modules/block/block.module @@ -375,6 +375,9 @@ $variables['attributes']['class'][] = 'block'; $variables['attributes']['class'][] = drupal_html_class('block-' . $variables['configuration']['provider']); + // Add default class for block content. + $variables['content_attributes']['class'][] = 'content'; + // Create a valid HTML ID and make sure it is unique. if ($id = $variables['elements']['#block']->id()) { $variables['attributes']['id'] = drupal_html_id('block-' . $id); reverted: --- b/core/modules/block/src/Tests/BlockPreprocessUnitTest.php +++ a/core/modules/block/src/Tests/BlockPreprocessUnitTest.php @@ -52,11 +52,10 @@ $variables['elements']['#derivative_plugin_id'] = $plugin->getDerivativeId(); $variables['elements']['content'] = array(); + // Test adding a class to the block content. + $variables['content_attributes']['class'][] = 'test-class'; - // Test adding a class to the block. - $variables['attributes']['class'][] = 'test-class'; template_preprocess_block($variables); + $this->assertEqual($variables['content_attributes']['class'], array('test-class', 'content'), 'Default .content class added to block content_attributes'); - - $this->assertEqual($variables['attributes']['class'], array('test-class', 'block', 'block-system'), 'Default .block and .block-system classes added to block'); } } reverted: --- b/core/themes/bartik/css/style.css +++ a/core/themes/bartik/css/style.css @@ -407,6 +407,10 @@ overflow: hidden; height: 1px; } +.region-header .block .content { + margin: 0; + padding: 0; +} .region-header .block ul { margin: 0; padding: 0; @@ -466,6 +470,9 @@ .region-header #block-user-login { width: auto; } +.region-header #block-user-login .content { + margin-top: 2px; +} .region-header #block-user-login .form-item { float: left; /* LTR */ margin: 0; @@ -886,21 +893,18 @@ padding: 15px 20px; margin: 0 0 20px; } +.sidebar h2 { -.sidebar .block > h2 { margin: 0 0 0.5em; border-bottom: 1px solid #d6d6d6; padding-bottom: 5px; text-shadow: 0 1px 0 #fff; + font-size: 1.071em; + line-height: 1.2; - font-size: 1.171em; - line-height: 0.857; } +.sidebar .block .content { -.sidebar .block { font-size: 0.914em; line-height: 1.4; } -.sidebar .block .contextual-links { - font-size: 1.010; -} .sidebar tbody { border: none; } @@ -968,12 +972,17 @@ /* ------------------ Footer ------------------ */ +#footer-wrapper .block .content { + color: #c0c0c0; + color: rgba(255, 255, 255, 0.65); + font-size: 0.857em; +} +#footer-wrapper .block .content a { -#footer-wrapper .block a { color: #fcfcfc; color: rgba(255, 255, 255, 0.8); } +#footer-wrapper .block .content a:hover, +#footer-wrapper .block .content a:focus { -#footer-wrapper .block a:hover, -#footer-wrapper .block a:focus { color: #fefefe; color: rgba(255, 255, 255, 0.95); } @@ -982,18 +991,6 @@ border: 1px solid #444; border-color: rgba(255, 255, 255, 0.1); padding: 10px; - color: #c0c0c0; - color: rgba(255, 255, 255, 0.65); - font-size: 0.857em; -} -#footer-wrapper .block .contextual .contextual-links a { - color: #333333; - font-size: 1em; - line-height: 1; -} -#footer-columns .block > h2 { - color: #3B3B3B; - font-size: 1.167em; } #footer-columns .block-menu, #footer .block { @@ -1003,7 +1000,10 @@ } #footer .block { margin: 0.5em 0; +} +#footer .block .content { padding: 0.5em 0; + margin-top: 0; } #footer .block > h2 { /* @extend .visually-hidden */ @@ -1023,26 +1023,26 @@ padding-bottom: 3px; text-transform: uppercase; } +#footer-columns .content { + margin-top: 0; +} #footer-columns p { margin-top: 1em; } +#footer-columns .content ul { -#footer-columns ul { list-style: none; padding-left: 0; /* LTR */ margin-left: 0; } +[dir="rtl"] #footer-columns .content ul { -[dir="rtl"] #footer-columns ul { padding-right: 0; } +#footer-columns .content li { -#footer-columns li { list-style: none; margin: 0; padding: 0; } +#footer-columns .content li a { -#footer-columns .contextual-links li { - line-height: 1; -} -#footer-columns li a { display: block; border-bottom: 1px solid #555; border-color: rgba(255, 255, 255, 0.15); @@ -1050,11 +1050,11 @@ padding: 0.8em 2px 0.8em 20px; /* LTR */ text-indent: -15px; } +[dir="rtl"] #footer-columns .content li a { -[dir="rtl"] #footer-columns li a { padding: 0.8em 20px 0.8em 2px; } +#footer-columns .content li a:hover, +#footer-columns .content li a:focus { -#footer-columns li a:hover, -#footer-columns li a:focus { background-color: #1f1f21; background-color: rgba(255, 255, 255, 0.05); text-decoration: none; only in patch2: unchanged: --- a/core/modules/block/src/Tests/BlockHtmlTest.php +++ b/core/modules/block/src/Tests/BlockHtmlTest.php @@ -48,7 +48,7 @@ function testHtml() { $this->assertFieldByXPath('//div[@id="block-test-html-block" and @data-custom-attribute="foo"]', NULL, 'HTML ID and attributes for test block are valid and on the same DOM element.'); // Ensure expected markup for a menu block. - $elements = $this->xpath('//div[contains(@class, :div-class)]/div/ul[contains(@class, :ul-class)]/li', array(':div-class' => 'block-system', ':ul-class' => 'menu')); + $elements = $this->xpath('//div[contains(@class, :div-class)]/ul[contains(@class, :ul-class)]/li', array(':div-class' => 'block-system', ':ul-class' => 'menu')); $this->assertTrue(!empty($elements), 'The proper block markup was found.'); } only in patch2: unchanged: --- a/core/modules/block/src/Tests/BlockViewBuilderTest.php +++ b/core/modules/block/src/Tests/BlockViewBuilderTest.php @@ -86,11 +86,8 @@ public function testBasicRendering() { $expected[] = '
'; $expected[] = ' '; $expected[] = ' '; - $expected[] = ''; - $expected[] = '
'; - $expected[] = ' '; - $expected[] = '
'; - $expected[] = '
'; + $expected[] = ' '; + $expected[] = ' '; $expected[] = ''; $expected_output = implode("\n", $expected); $this->assertEqual(drupal_render($output), $expected_output); @@ -114,11 +111,8 @@ public function testBasicRendering() { $expected[] = ' '; $expected[] = '

Powered by Bananas

'; $expected[] = ' '; - $expected[] = ''; - $expected[] = '
'; - $expected[] = ' '; - $expected[] = '
'; - $expected[] = ''; + $expected[] = ' '; + $expected[] = ' '; $expected[] = ''; $expected_output = implode("\n", $expected); $this->assertEqual(drupal_render($output), $expected_output); only in patch2: unchanged: --- a/core/modules/block/templates/block.html.twig +++ b/core/modules/block/templates/block.html.twig @@ -32,7 +32,6 @@ * * @ingroup themeable */ - @todo Remove the div around content as per http://drupal.org/node/1972122. #} {% set classes = [ @@ -46,10 +45,7 @@ {{ label }} {% endif %} {{ title_suffix }} - - - {% block content %} - {{ content }} - {% endblock %} - + {% block content %} + {{ content }} + {% endblock %} only in patch2: unchanged: --- a/core/modules/language/src/Tests/LanguageSwitchingTest.php +++ b/core/modules/language/src/Tests/LanguageSwitchingTest.php @@ -75,7 +75,7 @@ protected function doTestLanguageBlockAuthenticated($block_label) { // Assert that each list item and anchor element has the appropriate data- // attributes. - list($language_switcher) = $this->xpath('//div[@id=:id]/div[contains(@class, "content")]', array(':id' => 'block-test-language-block')); + list($language_switcher) = $this->xpath('//div[@id=:id]', array(':id' => 'block-test-language-block')); $list_items = array(); $anchors = array(); $labels = array(); @@ -125,7 +125,7 @@ protected function doTestLanguageBlockAnonymous($block_label) { $this->assertText($block_label, 'Language switcher block found.'); // Assert that only the current language is marked as active. - list($language_switcher) = $this->xpath('//div[@id=:id]/div[contains(@class, "content")]', array(':id' => 'block-test-language-block')); + list($language_switcher) = $this->xpath('//div[@id=:id]', array(':id' => 'block-test-language-block')); $links = array( 'active' => array(), 'inactive' => array(), only in patch2: unchanged: --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -115,7 +115,7 @@ function search_theme() { function search_preprocess_block(&$variables) { if ($variables['plugin_id'] == 'search_form_block') { $variables['attributes']['role'] = 'search'; - $variables['content_attributes']['class'][] = 'container-inline'; + $variables['attributes']['class'][] = 'container-inline'; } } only in patch2: unchanged: --- a/core/modules/views/src/Tests/Plugin/ExposedFormTest.php +++ b/core/modules/views/src/Tests/Plugin/ExposedFormTest.php @@ -143,7 +143,7 @@ public function testExposedBlock() { $this->drupalGet('test_exposed_block'); // Test there is an exposed form in a block. - $xpath = $this->buildXPathQuery('//div[@id=:id]/div/form/@id', array(':id' => drupal_html_id('block-' . $block->id()))); + $xpath = $this->buildXPathQuery('//div[@id=:id]/form/@id', array(':id' => drupal_html_id('block-' . $block->id()))); $this->assertFieldByXpath($xpath, $this->getExpectedExposedFormId($view), 'Expected form found in views block.'); // Test there is not an exposed form in the view page content area.