فهرست منبع

Remote: move link styles to theme.json (#6176)

* move link styles to theme.json

* Remote: Adding the removed text-decoration-thickness property but in theme.json

* Bump min version for Remote to 6.1

Co-authored-by: A8C <a8c@Madhus-MacBook-Pro.local>
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Madhu Dollu 2 سال پیش
والد
کامیت
010a91d607
3فایلهای تغییر یافته به همراه40 افزوده شده و 27 حذف شده
  1. 2 2
      remote/readme.txt
  2. 3 25
      remote/style.css
  3. 35 0
      remote/theme.json

+ 2 - 2
remote/readme.txt

@@ -1,7 +1,7 @@
 === Remote ===
 Contributors: 
-Requires at least: 6.0
-Tested up to: 6.0
+Requires at least: 6.1
+Tested up to: 6.1
 Requires PHP: 5.7
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html

+ 3 - 25
remote/style.css

@@ -4,8 +4,8 @@ Theme URI: https://wordpress.com/theme/remote
 Author: Automattic
 Author URI: https://automattic.com
 Description: Remote is a dark, minimal block theme ideal for bloggers. Its default styles - a sans-serif font and dark background - contribute for a comfortable, immersive reading experience. It features a set of bold block patterns such as a large posts list and bordered categories and tags.
-Requires at least: 6.0
-Tested up to: 6.0
+Requires at least: 6.1
+Tested up to: 6.1
 Requires PHP: 5.7
 Version: 1.0.11
 License: GNU General Public License v2 or later
@@ -173,28 +173,8 @@ body > .is-root-container,
  * Link Details
  */
 
- a {
-	text-decoration-thickness: 0.075ex;
+a {
 	text-underline-offset: 0.125em;
-	text-decoration: underline;
-}
-
-a:not(
-	.wp-block-search__button,
-	.wp-block-button__link
-):hover {
-	color: var(--wp--preset--color--primary);
-	text-decoration: none;
-}
-
-a:not(
-	.wp-block-search__button,
-	.wp-block-button__link,
-	.wp-block-site-title a,
-	.wp-block-post-title a
-):active {
-	color: var(--wp--preset--color--primary);
-	text-decoration: underline;
 }
 
 a:not(
@@ -203,9 +183,7 @@ a:not(
 	.wp-block-site-title a,
 	.wp-block-post-title a
 ):focus {
-	color: var(--wp--preset--color--primary);
 	outline: 1px dotted var(--wp--preset--color--primary);
-	text-decoration: none;
 	outline-offset: 3px;
 }
 

+ 35 - 0
remote/theme.json

@@ -198,6 +198,17 @@
 						}
 					}
 				}
+			},
+			"core/navigation": {
+				"elements": {
+					"link": {
+						":hover": {
+							"color": {
+								"text": "var(--wp--preset--color--primary)"
+							}
+						}
+					}
+				}
 			}
 		},
 		"color": {
@@ -244,6 +255,30 @@
 			"link": {
 				"color": {
 					"text": "var(--wp--preset--color--foreground)"
+				},
+				"typography": {
+					"textDecoration": "underline 0.075ex"
+				},
+				":hover": {
+					"color": {
+						"text": "var(--wp--preset--color--primary)"
+					},
+					"typography": {
+						"textDecoration": "none"
+					}
+				},
+				":active": {
+					"color": {
+						"text": "var(--wp--preset--color--primary)"
+					}
+				},
+				":focus": {
+					"color": {
+						"text": "var(--wp--preset--color--primary)"
+					},
+					"typography": {
+						"textDecoration": "none"
+					}
 				}
 			}
 		},