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[] = '