diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 70cce1e..5419e6d 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2834,10 +2834,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'), @@ -2848,10 +2844,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/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..fd347c3 100644 --- a/core/modules/system/templates/maintenance-page.html.twig +++ b/core/modules/system/templates/maintenance-page.html.twig @@ -13,80 +13,73 @@ * @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..691b9b2 100644 --- a/core/modules/system/templates/page.html.twig +++ b/core/modules/system/templates/page.html.twig @@ -50,8 +50,9 @@ * * Regions: * - page.header: Items for the header region. - * - page.highlighted: Items for the highlighted content region. - * - page.help: Dynamic help text, mostly for admin pages. + * comment/reply/page.help). + * - page.help: Dynamic help text, mostly for admin pages. + * Regions: * - page.content: The main content of the current page. * - page.sidebar_first: Items for the first sidebar. * - page.sidebar_second: Items for the second sidebar. @@ -66,41 +67,33 @@ * @ingroup themeable */ #} -
- -
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..8e3d71b 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; } @@ -23,71 +23,75 @@ img { height: auto; 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%; } @@ -110,3 +114,5 @@ img { display: none; } } + + diff --git a/core/includes/common.inc b/core/includes/common.inc index e4c9505..5e7689e 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2970,28 +2970,6 @@ function drupal_html_id($id) { } /** - * Provides a standard HTML class name that identifies a page region. - * - * It is recommended that template preprocess functions apply this class to any - * page region that is output by the theme (Drupal core already handles this in - * the standard template preprocess implementation). Standardizing the class - * names in this way allows modules to implement certain features, such as - * drag-and-drop or dynamic Ajax loading, in a theme-independent way. - * - * @param $region - * The name of the page region (for example, 'page_top' or 'content'). - * - * @return - * An HTML class that identifies the region (for example, 'region-page-top' - * or 'region-content'). - * - * @see template_preprocess_region() - */ -function drupal_region_class($region) { - return drupal_html_class("region-$region"); -} - -/** * Adds a JavaScript file, setting, or inline code to the page. * * The behavior of this function depends on the parameters it is called with. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 5419e6d..ab62472 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -3128,8 +3128,7 @@ function template_preprocess_region(&$variables) { $variables['content'] = $variables['elements']['#children']; $variables['region'] = $variables['elements']['#region']; - $variables['attributes']['class'][] = 'region'; - $variables['attributes']['class'][] = drupal_region_class($variables['region']); + $variables['attributes']['class'][] = "l-region-". $variables['region']; $variables['theme_hook_suggestions'][] = 'region__' . $variables['region']; } diff --git a/core/modules/system/templates/region.html.twig b/core/modules/system/templates/region.html.twig index fe566fe..a1148f4 100644 --- a/core/modules/system/templates/region.html.twig +++ b/core/modules/system/templates/region.html.twig @@ -22,7 +22,7 @@ */ #} {% if content %} - + {{ content }} {% endif %}