SOLVED: Nav nestable: Dropdowns with a page link cannot have the link styled if you use ACSS

Browser: Any
OS: macOS

I have a nav nestable menu that contains text links and dropdowns. Each of my dropdowns has an internal page link. I am using ACSS and this is controlling link styling.

I need to change the ACSS link styling for the entire menu. I have set the font colour and set text decoration to none everywhere and only the following change:

  • text links
  • dropdowns that do not have a page link

When the dropdown has a page link, any typography styling is not applied to the a tag, it is applied to the parent div (class brx-submenu-toggle) and so ACSS continues to style the label.

Here is a screenshot of the menu where one dropdown on the right does not have a page link. You can see that text links are styled in white with no underline but dropdowns with page links are styled by ACSS:

Here is the same menu after a page link has been added to the dropdown:

It needs the styling to be applied to the a tag for dropdowns with page links in the same way as for text links.

Hi Simon,
Thanks so much for your report!

Again, a live link would be easier to see where which styles come from, as especially the nestable nav element is super complex.

If I understand your report correctly, the styles come from ACSS? Then it is the responsibility of ACSS to address the correct selector :thinking:

How and where does custom CSS play a role (see title)?

Best regards,
timmse

ACSS sets link styling with this css:
body a {
color: var(–action);
font-weight: 500;
-webkit-text-decoration: underline;
text-decoration: underline;
text-underline-offset: 0.3em;
}

When you add a page link to a dropdown, Bricks sets typography changes not on the a tag which would override the above but instead it sets it on the div parent.

I have temporarily removed the custom css that fixes this issue so ACSS is still styling links on Home – Otter Vale Churches. I have added a dropdown with no page link before the button. I have then set on the nav nestable element all the top level items to have a colour of var(–primary-ultra-light) and to disable text decoration.

As you will see, all text links have obeyed this as has the dropdown with no page link. All those in purple with an underline are dropdowns with page links. If you inspect one you will see that the typography change is set at the div level and not on the a tag and the a tag has the ACSS style.

I can’t keep the menu this way for long as I need to get on with its development.

Thanks!

Hi timmse,

I’ve had to reset my main menu so I did a quick video for you:

https://jam.dev/c/5201c0d6-def4-47e2-bf48-415b293d17af

Hope it helps.

Hi Simon,
Thanks so much for the video! On point :ok_hand:

I put the topic up for discussion in the team yesterday and created a task after consultation.

Hi Simon,
We’ve fixed this bug in Bricks 1.8.2, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

Best regards,
timmse