diff --git a/core/includes/theme.inc b/core/includes/theme.inc index a3f967a..f01a567 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2841,10 +2841,6 @@ function template_preprocess_page(&$variables) { $variables['main_menu'] = array( '#theme' =>'links__system_main_menu', '#links' => $variables['main_menu'], - '#attributes' => array( - 'id' => 'main-menu', - 'class' => array('links', 'inline', 'clearfix'), - ), '#heading' => array( 'text' => t('Main menu'), 'class' => array('element-invisible'), @@ -2855,10 +2851,6 @@ function template_preprocess_page(&$variables) { $variables['secondary_menu'] = array( '#theme' =>'links__system_secondary_menu', '#links' => $variables['secondary_menu'], - '#attributes' => array( - 'id' => 'secondary-menu', - 'class' => array('links', 'inline', 'clearfix'), - ), '#heading' => array( 'text' => t('Secondary menu'), 'class' => array('element-invisible'), diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php index 10ff0a7..59bd2a3 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php @@ -166,11 +166,11 @@ function testListUI() { $this->assertTitle('Test configuration | Drupal'); // Test for the table. - $element = $this->xpath('//div[@id="content"]//table'); + $element = $this->xpath('//div[@class="l-content"]//table'); $this->assertTrue($element, 'Configuration entity list table found.'); // Test the table header. - $elements = $this->xpath('//div[@id="content"]//table/thead/tr/th'); + $elements = $this->xpath('//div[@class="l-content"]//table/thead/tr/th'); $this->assertEqual(count($elements), 3, 'Correct number of table header cells found.'); // Test the contents of each th cell. @@ -180,7 +180,7 @@ function testListUI() { } // Check the number of table row cells. - $elements = $this->xpath('//div[@id="content"]//table/tbody/tr[@class="odd"]/td'); + $elements = $this->xpath('//div[@class="l-content"]//table/tbody/tr[@class="odd"]/td'); $this->assertEqual(count($elements), 3, 'Correct number of table row cells found.'); // Check the contents of each row cell. The first cell contains the label, diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php index 8548f8e..62e6897 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php @@ -423,7 +423,7 @@ function testUrlLanguageFallback() { $this->assertTrue($fields[0] == $languages[$langcode_browser_fallback]->name, 'The browser language is the URL active language'); // Check that URLs are rewritten using the given browser language. - $fields = $this->xpath('//p[@id="site-name"]/strong/a[@rel="home" and @href=:url]', $args); + $fields = $this->xpath('//h1/a[@rel="home" and @href=:url and @class="site-name"]', $args); $this->assertTrue($fields[0] == 'Drupal', 'URLs are rewritten using the browser language.'); } diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php index f636849..255e79a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php @@ -115,7 +115,10 @@ function testThemeSettings() { // Verify the actual 'src' attribute of the logo being output. $this->drupalGet(''); - $elements = $this->xpath('//*[@id=:id]/img', array(':id' => 'logo')); + $elements = $this->xpath('//header/a[@rel=:rel]/img', array( + ':rel' => 'home', + ) + ); $this->assertEqual((string) $elements[0]['src'], $expected['src']); } $unsupported_paths = array( @@ -163,7 +166,10 @@ function testThemeSettings() { $uploaded_filename = 'public://' . $fields[0]['value']; $this->drupalGet(''); - $elements = $this->xpath('//*[@id=:id]/img', array(':id' => 'logo')); + $elements = $this->xpath('//header/a[@rel=:rel]/img', array( + ':rel' => 'home', + ) + ); $this->assertEqual($elements[0]['src'], file_create_url($uploaded_filename)); } diff --git a/core/modules/system/templates/html.html.twig b/core/modules/system/templates/html.html.twig index 02a542b..38226db 100644 --- a/core/modules/system/templates/html.html.twig +++ b/core/modules/system/templates/html.html.twig @@ -37,11 +37,9 @@ {{ scripts }} - {{ page_top }} {{ page }} {{ page_bottom }} diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/maintenance-page.html.twig index a57b546..2d77457 100644 --- a/core/modules/system/templates/maintenance-page.html.twig +++ b/core/modules/system/templates/maintenance-page.html.twig @@ -13,80 +13,71 @@ * @ingroup themeable */ #} - - - - {{ head_title }} + + {{ head }} + {{ head_title }} {{ styles }} {{ scripts }} -
- +
diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig index ff7c010..7753c8d 100644 --- a/core/modules/system/templates/page.html.twig +++ b/core/modules/system/templates/page.html.twig @@ -66,39 +66,30 @@ * @ingroup themeable */ #} -
- -
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSettingsTest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSettingsTest.php index cb90b6d..2c3ca69 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSettingsTest.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSettingsTest.php @@ -63,7 +63,7 @@ function testSettingsUI() { 'settings[comment][comment_node_article][translatable]' => TRUE, ); $this->assertSettings('comment', 'comment_node_article', FALSE, $edit); - $xpath_err = '//div[@id="messages"]//div[contains(@class, "error")]'; + $xpath_err = '//div[@class="messages"]//div[contains(@class, "error")]'; $this->assertTrue($this->xpath($xpath_err), 'Enabling translation only for entity bundles generates a form error.'); // Test that the translation settings are not stored if a non-configurable diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php index 50e8bbd..86fe176 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php @@ -191,7 +191,7 @@ protected function assertAuthoringInfo() { 'translation_entity[created]' => '19/11/1978', ); $this->drupalPost($path, $edit, $this->getFormSubmitAction($entity)); - $this->assertTrue($this->xpath('//div[@id="messages"]//div[contains(@class, "error")]//ul'), 'Invalid values generate a list of form errors.'); + $this->assertTrue($this->xpath('//div[@class="messages"]//div[contains(@class, "error")]//ul'), 'Invalid values generate a list of form errors.'); $this->assertEqual($entity->translation[$langcode]['uid'] == $values[$langcode]['uid'], 'Translation author correctly kept.'); $this->assertEqual($entity->translation[$langcode]['created'] == $values[$langcode]['created'], 'Translation date correctly kept.'); } diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php index deec20e..b3f7c02 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php @@ -42,15 +42,15 @@ function testSecondaryMenu() { // For a logged-in user, expect the secondary menu to have links for "My // account" and "Log out". - $link = $this->xpath('//ul[@id=:menu_id]/li/a[contains(@href, :href) and text()=:text]', array( - ':menu_id' => 'secondary-menu', + $link = $this->xpath('//ul[@class=:menu_class]/li/a[contains(@href, :href) and text()=:text]', array( + ':menu_class' => 'links', ':href' => 'user', ':text' => 'My account', )); $this->assertEqual(count($link), 1, 'My account link is in secondary menu.'); - $link = $this->xpath('//ul[@id=:menu_id]/li/a[contains(@href, :href) and text()=:text]', array( - ':menu_id' => 'secondary-menu', + $link = $this->xpath('//ul[@class=:menu_class]/li/a[contains(@href, :href) and text()=:text]', array( + ':menu_class' => 'links', ':href' => 'user/logout', ':text' => 'Log out', )); diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 0593a3c..1362e7e 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -50,6 +50,7 @@ function bartik_preprocess_page(&$variables) { } if (!empty($variables['secondary_menu'])) { $variables['secondary_menu']['#attributes']['id'] = 'secondary-menu-links'; + $variables['secondary_menu']['#attributes']['class'] = array('links', 'inline', 'clearfix'); } } diff --git a/core/themes/stark/css/layout-rtl.css b/core/themes/stark/css/layout-rtl.css index d5e9c6d..e1f6624 100644 --- a/core/themes/stark/css/layout-rtl.css +++ b/core/themes/stark/css/layout-rtl.css @@ -1,52 +1,52 @@ @media all and (min-width: 480px) and (max-width: 959px) { - body.sidebar-first #content, - body.two-sidebars #content { + body.sidebar-first .l-content, + body.two-sidebars .l-content { float: left; } - body.sidebar-second #content { + body.sidebar-second .l-content { float: right; } - #sidebar-first { + .l-sidebar-first { float: right; } - #sidebar-second { + .l-sidebar-second { float: left; } - body.two-sidebars #sidebar-second { + body.two-sidebars .l-sidebar-second { float: right; clear: right; } - body.two-sidebars #sidebar-second .block { + body.two-sidebars .l-sidebar-second .block { float: right; } } @media all and (min-width: 960px) { - #content { + .l-content { float: right; } - body.sidebar-first #content { + body.sidebar-first .l-content { left: 0; right: 20%; } - body.two-sidebars #content { + body.two-sidebars .l-content { left: 0; right: 20%; } - #sidebar-first { + .l-sidebar-first { float: right; left: 0; right: -80%; } - body.two-sidebars #sidebar-first { + body.two-sidebars .l-sidebar-first { left: 0; right: -60%; } - #sidebar-second { + .l-sidebar-second { float: left; } } diff --git a/core/themes/stark/css/layout.css b/core/themes/stark/css/layout.css index 39f533b..536c3e8 100644 --- a/core/themes/stark/css/layout.css +++ b/core/themes/stark/css/layout.css @@ -9,12 +9,12 @@ * This layout method works reasonably well, but shouldn't be used on a * production site because it can break. For example, if an over-large image * (one that is wider than 20% of the viewport) is in the left sidebar, the - * image will overlap with the #content to the right. + * image will overlap with the .l-content to the right. */ -#content, -#sidebar-first, -#sidebar-second { +.l-content, +.l-sidebar-first, +.l-sidebar-second { display: inline; position: relative; } @@ -24,70 +24,75 @@ img { max-width: 100%; } +header[role="banner"], +footer[role="contentinfo"]{ + clear:both; + width:100% +} @media all and (min-width: 480px) and (max-width: 959px) { - #content { + .l-content { width: 100%; } - body.sidebar-first #content, - body.two-sidebars #content { + body.sidebar-first .l-content, + body.two-sidebars .l-content { width: 67%; float: right; /* LTR */ } - body.sidebar-second #content { + body.sidebar-second .l-content { width: 67%; float: left; /* LTR */ } - #sidebar-first { + .l-sidebar-first { width: 33%; float: left; /* LTR */ } - #sidebar-second { + .l-sidebar-second { width: 33%; float: right; /* LTR */ } - body.two-sidebars #sidebar-second { + body.two-sidebars .l-sidebar-second { clear: both; width: 100%; } - body.two-sidebars #sidebar-second .block { + body.two-sidebars .l-sidebar-second .block { float: left; /* LTR */ width: 33%; } - body.two-sidebars #sidebar-second .block:nth-child(3n+1) { + body.two-sidebars .l-sidebar-second .block:nth-child(3n+1) { clear: both; } } @media all and (min-width: 960px) { - #content { + .l-content { width: 100%; float: left; /* LTR */ } - body.sidebar-first #content { + body.sidebar-first .l-content { width: 80%; left: 20%; /* LTR */ } - body.sidebar-second #content { + body.sidebar-second .l-content { width: 80%; } - body.two-sidebars #content { + body.two-sidebars .l-content { width: 60%; left: 20%; /* LTR */ } - #sidebar-first { + .l-sidebar-first { width: 20%; float: left; /* LTR */ left: -80%; /* LTR */ } - body.two-sidebars #sidebar-first { + body.two-sidebars .l-sidebar-first { left: -60%; /* LTR */ } - #sidebar-second { + .l-sidebar-second { float: right; /* LTR */ width: 20%; }