Connected class names in DOM

Hello i have found out that after last update my navigation got broken - some styles applied just to certain nav items. (with no change on my part) After closer inspection i figured it out.

There are classes without space so styles are not applied. It is not happening with every link which is weird. But here is a screenshot.

When I add space like this

Everything works. I dit not used any custom classes or css. Everything is native cwicly.
I did regenerated html and css, didnt help.

Environment info

  • WordPress version: 6.3.2
  • Cwicly Plugin version: 1.3.2.2

The additional styles are coming from the menu itself. By default the initial space is included.

Note: If you don’t see this, go to Screen Options at the top right and enable the “CSS Classes” option:

That’s the actual issue. There shouldn’t be an initial and mandatory space. What’s the point?

I agree, even though this may be a WordPress issue, it should be straightforward to add one as needed on the Cwicly side to protect against the removal of the space if they choose to do that.

I think that for now it is good solution quick fix. But I think that this is just some typo.
I can imagine that it should be quick fix.

That’s my thoughts as well, but can’t imagine…
I do however appreciate the fact that the recently added WP default menu item classes can still be removed.

1 Like

Yes! Very good point.

I assigned a class to a menu item in the WordPress menu and wanted to style it in the Cwicly scss panel but is not detectable…

It seems like Cwicly is not detecting the Class from the WordPress Menu Item

When I add the class header-cta on the menu item (WordPress, see picture) when inspecting the class, it merges with the Cwicly class and results in .cc-nav-menuheader-cta

If I add a space before typing the class in the WordPress menu when inspecting is the class is added correctly (like in the screenshot) but it cannot be detected by Cwicly

Duplicate of: Connected class names in DOM

Hi,

Thanks so much for the report.

A space is included by default by WordPress.
We will add a check so that there is no inconsistency if the space has been removed by the user.

The missing menu classes in the editor will also be added.

Best regards,
Johnny

Hi @JohnySvitana and @Titus,

Thank you both for reporting this!

This should now be fixed with 1.3.3:

Kindly let us know if this is fixed on your end.

Thank you in advance.