Explorar o código

Block canvas: replacing button :hover CSS by theme.json definition (#6486)

* Block canvas: adding pseudo selectors

* Button hover state in themes.json
Matias Benedetto %!s(int64=2) %!d(string=hai) anos
pai
achega
fa927d31ff
Modificáronse 2 ficheiros con 6 adicións e 13 borrados
  1. 0 12
      block-canvas/style.css
  2. 6 1
      block-canvas/theme.json

+ 0 - 12
block-canvas/style.css

@@ -37,18 +37,6 @@ GNU General Public License for more details.
 	-webkit-font-smoothing: antialiased;
 }
 
-/*
- * Button hover styles.
- * Necessary until the following issue is resolved in Gutenberg:
- * https://github.com/WordPress/gutenberg/issues/27075
- */
-
-.wp-block-search__button:hover,
-.wp-block-file .wp-block-file__button:hover,
-.wp-block-button__link:hover {
-	background-color: var(--wp--preset--color--secondary);
-}
-
 /*
  * Responsive menu container padding.
  * This ensures the responsive container inherits the same

+ 6 - 1
block-canvas/theme.json

@@ -305,7 +305,12 @@
 						"left": "calc(1.333em + 2px)",
 						"right": "calc(1.333em + 2px)"
 					}
-				}
+				},
+                ":hover": {
+                    "color": {
+                        "background": "var(--wp--preset--color--secondary)"
+                    }
+                }
 			},
             "h1": {
                 "typography": {