You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I shared this finding on a WordPress group on Facebook and comments suggested I should raise it as a bug.
I am building an FSE WordPress theme from scratch, I am fairly new to building themes and wondering if there is an answer to the below. I can of course override using a CSS stylesheet, but I want to keep much as possible in the theme.json file.
The ":active" pseudo-class isn't working in my theme.json file. The ":hover" class is working within theme.json.
Step-by-step reproduction instructions
See screenshots, using theme.json to control the active state of the navigational 'li' element when building a custom Wordpress theme.
Screenshots, screen recording, code snippet
Environment info
Wordpress: 6.4.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered:
In my theme it's working as attended.
You circled "about" in your screenshot, which makes me think that you might confuse :active (which is the state when the mouse button is still hold down) with the current menu item?
Styling the current page is not implemented yet: #42299
Of course! That makes sense now, my apologies for not recognising that! It
is the 'current' that I was looking to achieve within the theme.json file.
You're 100% spot on, thank you for correcting me. As the issue has
previously been raised, please close my opened ticket. I do have work
around in the meantime, targeting the 'current' class on the 'li' element
within a CSS stylesheet using a custom variable that I've defined in
theme.json. Many thanks!
Description
I shared this finding on a WordPress group on Facebook and comments suggested I should raise it as a bug.
I am building an FSE WordPress theme from scratch, I am fairly new to building themes and wondering if there is an answer to the below. I can of course override using a CSS stylesheet, but I want to keep much as possible in the theme.json file.
The ":active" pseudo-class isn't working in my theme.json file. The ":hover" class is working within theme.json.
Step-by-step reproduction instructions
See screenshots, using theme.json to control the active state of the navigational 'li' element when building a custom Wordpress theme.
Screenshots, screen recording, code snippet
Environment info
Wordpress: 6.4.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: