Browse Source

Archeo: Remove text decoration from post titles (#5573)

* Archeo: Remove text decoration from post titles

* Add patch for title text-decoration

And tidied up some comments

* Fix text-decoration on hover

* Fix spacing

* Exclude buttons from link hover styles

* Apply text-decoration styles to all post title blocks

* Fix navigation text-decoration rule

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Ben Dwyer 3 năm trước cách đây
mục cha
commit
0f72ea5ede

+ 4 - 4
archeo/inc/patterns/simple-list-of-posts-with-background.php

@@ -10,12 +10,12 @@ return array(
 		<!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"bottom":"60px"}}},"fontSize":"medium"} -->
 		<h3 class="has-medium-font-size" style="margin-bottom:60px">' . __( 'Selected Writings', 'archeo' ) . '</h3>
 		<!-- /wp:heading -->
-		
+
 		<!-- wp:query {"queryId":3,"query":{"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"perPage":3}} -->
 		<div class="wp-block-query"><!-- wp:post-template -->
 		<!-- wp:group {"className":"simple-list-of-posts","layout":{"type":"flex","allowOrientation":false}} -->
-		<div class="wp-block-group simple-list-of-posts"><!-- wp:post-title {"isLink":true,"style":{"typography":{"lineHeight":"1.2","fontStyle":"normal","fontWeight":"100"}},"fontSize":"huge"} /-->
-		
+		<div class="wp-block-group simple-list-of-posts"><!-- wp:post-title {"isLink":true,"style":{"typography":{"lineHeight":"1.2","fontStyle":"normal","fontWeight":"100","textDecoration":"none"}},"fontSize":"huge"} /-->
+
 		<!-- wp:post-author-name {"style":{"typography":{"fontStyle":"normal","fontWeight":"100","lineHeight":"1.2"}},"fontSize":"medium"} /--></div>
 		<!-- /wp:group -->
 		<!-- /wp:post-template -->
@@ -28,4 +28,4 @@ return array(
 		<!-- /wp:query-pagination --></div>
 		<!-- /wp:query --></div>
 		<!-- /wp:group -->',
-);
+);

+ 17 - 5
archeo/style.css

@@ -50,10 +50,11 @@ a {
 	text-decoration: none;
 }
 
-a:hover,
+a:hover:not(.wp-block-button__link),
 .wp-block-site-title a:hover,
 .wp-block-post-title a:hover,
 .wp-block-post-date a:hover {
+	text-decoration-line: underline;
 	text-decoration-style: dotted;
 }
 
@@ -67,7 +68,7 @@ a:active,
 .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 {
-	text-decoration: underline;
+	text-decoration-line: underline;
 }
 
 /*
@@ -177,7 +178,7 @@ body > .is-root-container > .wp-block-template-part > .wp-block-cover,
 }
 
 /*
- * We need this until https://github.com/WordPress/gutenberg/issues/37035 is fixed.
+ * Needed until https://github.com/WordPress/gutenberg/issues/37035 is fixed.
  */
 .wp-block-navigation__responsive-container.is-menu-open ul {
 	font-size: var(--wp--preset--font-size--large) !important;
@@ -198,17 +199,28 @@ body > .is-root-container > .wp-block-template-part > .wp-block-cover,
 }
 
 /*
- * We need this until https://github.com/WordPress/gutenberg/issues/38498 is fixed.
+ * Needed until https://github.com/WordPress/gutenberg/issues/38498 is fixed.
  */
 .wp-block-group.simple-list-of-posts {
 	align-items: baseline;
 }
 
+/*
+ * Needed until https://github.com/WordPress/gutenberg/pull/38986 is merged.
+ */
+.wp-block-post-title a {
+	text-decoration-line: none;
+}
+
+.wp-block-post-title a:hover {
+	text-decoration-line: underline;
+}
+
 /*
  * Needed until there's a fix in GB.
  * Related: https://github.com/WordPress/gutenberg/pull/39045
  */
- .wp-block-image img {
+.wp-block-image img {
 	height: auto;
 	max-width: 100%;
 }