Browse Source

Stewart: Move link and hover settings to theme.json (#6121)

* Stewart: Move link color and hover color to theme.json

* move text decoration rules to JSON

* Bump min version for Stewart to 6.1

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Ben Dwyer 2 years ago
parent
commit
8458a1c58a
3 changed files with 21 additions and 18 deletions
  1. 2 2
      stewart/readme.txt
  2. 2 16
      stewart/style.css
  3. 17 0
      stewart/theme.json

+ 2 - 2
stewart/readme.txt

@@ -1,7 +1,7 @@
 === Stewart ===
 Contributors: automattic
-Requires at least: 5.8
-Tested up to: 5.8
+Requires at least: 6.1
+Tested up to: 6.1
 Requires PHP: 5.6
 Stable tag: 1.0
 License: GPLv2 or later

+ 2 - 16
stewart/style.css

@@ -4,8 +4,8 @@ Theme URI: https://wordpress.com/theme/stewart
 Author: Automattic
 Author URI: https://automattic.com/
 Description: Stewart is a modern blogging theme with a left sidebar. Its default color scheme is a striking combination of orange and light gray, to give your blog a sophisticated appearance from day one.
-Requires at least: 5.8
-Tested up to: 5.8
+Requires at least: 6.1
+Tested up to: 6.1
 Requires PHP: 5.7
 Version: 1.13
 License: GNU General Public License v2 or later
@@ -57,25 +57,11 @@ a {
 	text-decoration: none;
 }
 
-a:hover,
-.wp-block-site-title a:hover,
-.wp-block-post-title a:hover,
-.wp-block-post-date a:hover {
-	color: var(--wp--preset--color--primary);
-}
-
-.wp-block-navigation .wp-block-navigation-link a,
-.wp-block-navigation .wp-block-page-list a,
-.wp-block-navigation .wp-block-pages-list__item a,
 .wp-block-navigation .wp-block-post-title a {
 	text-decoration: underline;
 }
 
-.wp-block-navigation .wp-block-navigation-link a:hover,
-.wp-block-navigation .wp-block-page-list a:hover,
-.wp-block-navigation .wp-block-pages-list__item a:hover,
 .wp-block-navigation .wp-block-post-title a:hover {
-	color: var(--wp--preset--color--primary);
 	text-decoration: none;
 }
 

+ 17 - 0
stewart/theme.json

@@ -237,6 +237,18 @@
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--small)",
 					"lineHeight": 2
+				},
+				"elements": {
+					"link": {
+						"typography": {
+							"textDecoration": "underline"
+						},
+						":hover": {
+							"typography": {
+								"textDecoration": "none"
+							}
+						}
+					}
 				}
 			},
 			"core/post-title": {
@@ -374,6 +386,11 @@
 			"link": {
 				"color": {
 					"text": "var(--wp--preset--color--foreground)"
+				},
+				":hover": {
+					"color": {
+						"text": "var(--wp--preset--color--primary)"
+					}
 				}
 			}
 		},