I am not sure this is possible, but I figured I would ask in public so anyone else could answer, but my guess is that if anyone knows it will be @victordcq lol
Is it possible to create a style that bases itself off of the current URL in some way? I know through some googling there used to be an @document selector in CSS that would enable you to make style classes based off the document title. However it doesn't seem that's still there anymore.
I am trying to automatically apply a style class to a menu item if you are on its target page.
A few other solutions that don't solve the problem today, but could in the longer term:
A binding on the page url, that climbs the menu trees items and updates it that way, but that feels like a hacky workaround not a clean solution.
A feature request to add something like an "on target" style property to each menu item
I went a somewhat different route to achieve that, but it might be due to some design choices.
Every time navigate is called, I also send a message called page_changed. I need this to update docks (no alterDock function available at the time).
The menu also catches this message and stores in a custom property what page (sent in the payload) is currently displayed. Every item in the menu can then use that to switch its style class.