Skip to content

Commit

Permalink
corrects path for submenu items if CSS agg is turned on
Browse files Browse the repository at this point in the history
  • Loading branch information
markconroy committed Nov 29, 2024
1 parent bdaca03 commit 1894451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions css/base/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ body {
--menu-main-font-size: var(--font-size-h3);
--menu-main-font-weight: var(--heading-font-weight);
--minimum-clickable-icon-size: 44px; /* Setting default to 44px as per https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
--menu-sub-menu-icon: url(../../includes/icons/chevron-right.svg);
--menu-sub-menu-icon: url(/themes/contrib/localgov_microsites_base/includes/icons/chevron-right.svg);
--menu-sub-menu-icon-size: 1.2rem;
--menu-sub-menu-toggle-width: var(--minimum-clickable-icon-size);
--menu-sub-menu-toggle-height: var(--minimum-clickable-icon-size);
Expand All @@ -93,7 +93,7 @@ body {
--off-canvas-link-color: var(--header-link-color);
--off-canvas-link-hover-color: var(--header-link-hover-color);
--off-canvas-border-color: var(--color-white);
--off-canvas-menu-icon: url(../../includes/icons/menu.svg);
--off-canvas-menu-icon: url(/themes/contrib/localgov_microsites_base/includes/icons/menu.svg);

/* Applying variables for Footer */
--footer-background-color: var(--color-accent);
Expand Down
4 changes: 2 additions & 2 deletions localgov_microsites_base.theme
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function localgov_microsites_base_preprocess_html(&$variables) {
// Main menu submenu icon.
if (!is_null($group->get('lgms_submenu_icon')[0])) {
$submenu_icon = $group->get('lgms_submenu_icon')[0]->getValue()['value'];
$variables['attributes']['style'][] = '--menu-sub-menu-icon: url(../../includes/icons/' . $submenu_icon . '.svg) ;';
$variables['attributes']['style'][] = '--menu-sub-menu-icon: url(/themes/contrib/localgov_microsites_base/includes/icons/' . $submenu_icon . '.svg) ;';
}

// Main menu submenu icon rotation.
Expand All @@ -383,7 +383,7 @@ function localgov_microsites_base_preprocess_html(&$variables) {
// Off canvas menu icon.
if (!is_null($group->get('lgms_off_canvas_menu_icon')[0])) {
$off_canvas_menu_icon = $group->get('lgms_off_canvas_menu_icon')[0]->getValue()['value'];
$variables['attributes']['style'][] = '--off-canvas-menu-icon: url(../../includes/icons/' . $off_canvas_menu_icon . '.svg) ;';
$variables['attributes']['style'][] = '--off-canvas-menu-icon: url(/themes/contrib/localgov_microsites_base/includes/icons/' . $off_canvas_menu_icon . '.svg) ;';
}

// Off canvas background colour.
Expand Down

0 comments on commit 1894451

Please sign in to comment.