Make WordPress Core

Opened 14 months ago

Closed 8 weeks ago

#58875 closed defect (bug) (reported-upstream)

The hover effect in theme.json is not working

Reported by: titanchan's profile titanchan Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.2.2
Component: Editor Keywords:
Focuses: Cc:

Description (last modified by sabernhardt)

While the color of nav links is working, the hover color of those is not working.

  "core/navigation": {
        "color": {
          "text": "var(--wp--preset--color--midred-2)"
        },
        "elements": {
          "link": {
            ":hover": {
              "color": {
                "text": "var(--wp--preset--color--lightred-3)"
              }
            }
          }
        }
      }

Change History (6)

#1 @rajinsharwar
14 months ago

HI @titanchan, can you add more replication steps, and more details of the bug?

#2 @titanchan
14 months ago

https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/

I have followed all the steps suggested by this post, I've found two bugs actually.

One is what I've mentioned previously, which I was setting the hover color for the nav-links.
I wrote the styles session -> blocks -> core/navigation -> color -> text. This is totally working so far.

But when I add elements -> link -> :hover -> color -> text. The hover color is not working.
This is the details of the problem I've encountered.

Another bug is that some rows/ columns have the control of height, while some have the control of width for the dimension control. This may also be a bug as the remaining control is missing. I've already set the appearanceTools to true.

Finally, the last bug that I've found is the border style control is missing as I've already set it to true.

Last edited 14 months ago by titanchan (previous) (diff)

#3 @audrasjb
14 months ago

  • Component changed from General to Editor

#4 @poena
13 months ago

Hi @titanchan!

I was able to reproduce the problem with the elements > links > hover > color > text added to theme.json not working for the navigation, page list, navigation link, and navigation submenu blocks. (The resulting CSS has a specificity that is too low to override the inherited color)

Enabling the borders in theme.json > settings only enables the control for blocks that support it, not for all blocks.

Kindly report one issue per ticket. When multiple possibly unrelated problems are reported in the same ticket, they are more difficult to manage.

When updates like bug fixes are made to the editor, they are made in the Gutenberg plugin first. This is so that the changes can be tested before updating WordPress itself.

Because of that, issues related to the editor and the blocks should be reported in the Gutenberg GitHub repository.
https://github.com/WordPress/gutenberg/

Before opening a new issue, please use the search on GitHub to check if the problem has already been reported.
Please comment on this ticket if you open new issues or need help doing this.

#5 @sabernhardt
7 months ago

  • Description modified (diff)
  • Keywords move-to-github close added

#6 @desrosj
8 weeks ago

  • Keywords move-to-github close removed
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

It seems like this report upstream is for the same issue. Going to close this out. But if this is actually different, please file a new report.

Note: See TracTickets for help on using tickets.