浏览代码

Pendant: replacing CSS with theme.json settings for link elements (#6179)

* Pendant: replacing CSS with theme.json settings for link elements

* Bump min version for Pendant to 6.1

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Matias Benedetto 2 年之前
父节点
当前提交
616adeb48b
共有 3 个文件被更改,包括 45 次插入25 次删除
  1. 2 2
      pendant/readme.txt
  2. 2 21
      pendant/style.css
  3. 41 2
      pendant/theme.json

+ 2 - 2
pendant/readme.txt

@@ -1,7 +1,7 @@
 === Pendant ===
 Contributors: Automattic
-Requires at least: 5.9
-Tested up to: 5.9
+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

+ 2 - 21
pendant/style.css

@@ -4,8 +4,8 @@ Theme URI: https://wordpress.com/theme/pendant
 Author: Automattic
 Author URI: https://automattic.com
 Description: An elegant product-focused theme
-Requires at least: 5.9
-Tested up to: 5.9
+Requires at least: 6.1
+Tested up to: 6.1
 Requires PHP: 5.7
 Requires Gutenberg: 13.1
 Version: 1.0.10
@@ -41,25 +41,6 @@ a {
 	text-underline-offset: 0.15em;
 	text-decoration-thickness: 0.02em;
 }
-a:hover,
-a:focus {
-	text-decoration-line: underline;
-	text-underline-offset: 0.3em;
-	text-decoration-thickness: 0.05em;
-}
-.block-editor-block-list__layout a,
-.wp-block-post-content a {
-	text-decoration-line: underline;
-}
-.block-editor-block-list__layout a:hover,
-.block-editor-block-list__layout a:focus,
-.wp-block-post-content a:focus,
-.wp-block-post-content a:hover {
-	text-decoration: none;
-}
-.wp-block-button a {
-	text-decoration: none;
-}
 
 /*
  * Button hover styles.

+ 41 - 2
pendant/theme.json

@@ -173,6 +173,11 @@
 	},
 	"styles": {
 		"blocks": {
+			"core/post-title": {
+				"typography": {
+					"textDecoration": "none"
+				}
+			},
 			"core/button": {
 				"border": {
 					"radius": "0px"
@@ -290,6 +295,30 @@
 					"fontWeight": "900",
 					"textDecoration": "none"
 				}
+			},
+			"core/post-content": {
+				"elements": {
+					"h6": {
+						"typography": {
+							"fontSize": "40px"
+						}
+					},
+					"link": {
+						"typography": {
+							"textDecoration": "underline"
+						},
+						":hover": {
+							"typography": {
+								"textDecoration": "none"
+							}
+						},
+						":focus": {
+							"typography": {
+								"textDecoration": "none"
+							}
+						}
+					}
+				}
 			}
 		},
 		"color": {
@@ -345,11 +374,21 @@
 				}
 			},
 			"link": {
+				"typography": {
+					"textDecoration": "none"
+				},
 				"color": {
 					"text": "var(--wp--preset--color--foreground)"
 				},
-				"typography": {
-					"textDecoration": "none"
+				":hover": {
+					"typography": {
+						"textDecoration": "underline"
+					}
+				},
+				":focus": {
+					"typography": {
+						"textDecoration": "underline"
+					}
 				}
 			}
 		},