Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Styling Selectors for Active Elements in tieredmenu when Customizing Themes #38

Open
Gykonik opened this issue Aug 16, 2023 · 2 comments
Labels
discussion Issue or pull request needs to be discussed by Core Team

Comments

@Gykonik
Copy link

Gykonik commented Aug 16, 2023

I've noticed a discrepancy in the CSS selectors for active elements within the tieredmenu component when using custom themes.

Steps to reproduce:

  1. Configure a theme for tieredmenu.
  2. Export the styles and compare the active element's CSS selectors.

Expected Behavior:
Using the default lara-light-blue theme as a reference, the selector should be:

.p-tieredmenu .p-menuitem.p-highlight > .p-menuitem-content

Observed Behavior:
The exported styles, however, use:

.p-tieredmenu .p-menuitem.p-menuitem-active > .p-menuitem-link

This inconsistency causes the highlighting on tieredmenus not to work as intended when customizing and importing themes based on lara-light-blue.

It's worth noting that the default lara-light-blue theme that ships with PrimeNG handles this correctly. The discrepancy arises when exporting a configured theme (even though you don't need to change any of the config) and re-importing this theme into a project.

@cetincakiroglu cetincakiroglu added the discussion Issue or pull request needs to be discussed by Core Team label Sep 26, 2023
@cetincakiroglu
Copy link
Contributor

Hi @Gykonik,

Thanks for reporting the issue! We'll discuss that with the team and decide what to do about it. For now, could you please provide some screenshots demonstrating the difference between the two themes so we can clearly see the issue.

@Gykonik
Copy link
Author

Gykonik commented Sep 26, 2023

Sure, the following example is from the Website
image

And this is the example taken from here. It's basically the same, except I've used a custom style. For the custom style, I directly exported Lara-Light from PrimeNGs Theme Designer without any modifications. The result is, that when you try to select items with the keyboard, they are not highlighted (even though I can properly tab, expand, collapse, etc.)

In the following image, the "File" is selected using the keyboard only, and no highlight is visible at all (unlike the example on the website where everything works as expected). So I'm pretty sure, the selectors are off in the "exported Theme".
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issue or pull request needs to be discussed by Core Team
Projects
None yet
Development

No branches or pull requests

2 participants