浏览代码

Merge pull request #2886 from Automattic/fix/spearhead-trt-bugs

Spearhead: address remaining TRT feedback
Jeff Ong 4 年之前
父节点
当前提交
a7034f6c1c

+ 4 - 0
spearhead/assets/sass/_header.scss

@@ -83,6 +83,10 @@ $site-branding-height: 68px;
 					color: var(--primary-nav--dropdown-color-link);
 				}
 			}
+
+			.social-navigation a {
+				color: var(--primary-nav--dropdown-color-link);
+			}
 		}
 
 		button#primary-close-menu {

+ 7 - 1
spearhead/assets/sass/_text.scss

@@ -2,12 +2,18 @@
     border-bottom: 1px solid transparent;
     transition: all 0.1s ease;
 
-    &:hover:not(.wp-block-button__link) {
+    &:hover:not(.wp-block-button__link):not(.wp-block-file__button) {
         color: var( --global--color-primary-hover );
         border-bottom: 1px solid var( --global--color-primary-hover );
     }
 }
 
+.wp-block a, // Target the editor link styles also.
 .entry-content a {
     font-weight: var(--global--link-font-weight);
+    border-color: var( --global--color-primary ); // Links inside the post content must be underlined.
+
+    &:hover:not(.wp-block-button__link) {
+        border-color: transparent;
+    }
 }

+ 10 - 0
spearhead/assets/sass/navigation.scss

@@ -60,6 +60,16 @@ div.extra-navigation-wrapper {
 		visibility: visible;
 		opacity: 1;
 		transform: translateY( $header-height );
+
+		.menu-item > a {
+			&:hover, &:focus {
+				color: #ff6a81; // Use the dark mode styles so that the focus styles are accessible.
+			}
+
+			&:active {
+				color: #b2b2b2; // Use the dark mode styles so that the focus styles are accessible.
+			}
+		}
 	}
 
 	$menu-offset-with-logo: calc( var(--branding--logo--max-height) + ( 2 * var(--global--spacing-vertical) ) );

+ 1 - 1
spearhead/assets/sass/style.scss

@@ -7,7 +7,7 @@ Description: Share your podcast with the world using Spearhead.
 Requires at least: 5.5
 Tested up to: 5.5
 Requires PHP: 5.6.2
-Version: 1.2.2
+Version: 1.2.3
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: seedlet

+ 4 - 1
spearhead/functions.php

@@ -223,7 +223,10 @@ function spearhead_more_link() {
  * Use this instead of the default WordPress ellipsis which is […].
  */
 function spearhead_excerpt_more() {
-	return '…';
+	if ( is_admin() ) {
+		return $more;
+	}
+	return '…';
 }
 
 function spearhead_the_excerpt( $excerpt ) {

+ 7 - 8
spearhead/header.php

@@ -58,14 +58,13 @@ $header_classes .= $has_primary_nav ? ' has-menu' : '';
 						if ( has_nav_menu( 'social' ) ) :
 							wp_nav_menu(
 								array(
-									'theme_location' => 'social',
-									'link_before'    => '<span class="screen-reader-text">',
-									'link_after'     => '</span>' . seedlet_get_icon_svg(
-										'link',
-										'container_class' => 'social-navigation',
-										'depth'           => 1
-									),
-								);
+									'theme_location'  => 'social',
+									'link_before'     => '<span class="screen-reader-text">',
+									'link_after'      => '</span>' . seedlet_get_icon_svg( 'link' ),
+									'container_class' => 'social-navigation',
+									'depth'           => 1,
+								),
+							);
 						endif;
 						?>
 					</div><!-- .extra-navigation-wrapper -->

+ 8 - 0
spearhead/navigation-rtl.css

@@ -574,6 +574,14 @@
 	transform: translateY(80px);
 }
 
+.primary-navigation-open div.extra-navigation-wrapper .menu-item > a:hover, .primary-navigation-open div.extra-navigation-wrapper .menu-item > a:focus {
+	color: #ff6a81;
+}
+
+.primary-navigation-open div.extra-navigation-wrapper .menu-item > a:active {
+	color: #b2b2b2;
+}
+
 .primary-navigation-open .has-logo:not(.has-title-and-tagline) div.extra-navigation-wrapper {
 	transform: translateY(calc( var(--branding--logo--max-height) + ( 2 * var(--global--spacing-vertical) )));
 	bottom: calc( var(--branding--logo--max-height) + ( 2 * var(--global--spacing-vertical) ));

+ 8 - 0
spearhead/navigation.css

@@ -574,6 +574,14 @@
 	transform: translateY(80px);
 }
 
+.primary-navigation-open div.extra-navigation-wrapper .menu-item > a:hover, .primary-navigation-open div.extra-navigation-wrapper .menu-item > a:focus {
+	color: #ff6a81;
+}
+
+.primary-navigation-open div.extra-navigation-wrapper .menu-item > a:active {
+	color: #b2b2b2;
+}
+
 .primary-navigation-open .has-logo:not(.has-title-and-tagline) div.extra-navigation-wrapper {
 	transform: translateY(calc( var(--branding--logo--max-height) + ( 2 * var(--global--spacing-vertical) )));
 	bottom: calc( var(--branding--logo--max-height) + ( 2 * var(--global--spacing-vertical) ));

+ 12 - 2
spearhead/style-rtl.css

@@ -7,7 +7,7 @@ Description: Share your podcast with the world using Spearhead.
 Requires at least: 5.5
 Tested up to: 5.5
 Requires PHP: 5.6.2
-Version: 1.2.2
+Version: 1.2.3
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: seedlet
@@ -197,13 +197,20 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	transition: all 0.1s ease;
 }
 
-.has-link-color a:hover:not(.wp-block-button__link), a:hover:not(.wp-block-button__link) {
+.has-link-color a:hover:not(.wp-block-button__link):not(.wp-block-file__button), a:hover:not(.wp-block-button__link):not(.wp-block-file__button) {
 	color: var(--global--color-primary-hover);
 	border-bottom: 1px solid var(--global--color-primary-hover);
 }
 
+.wp-block a,
 .entry-content a {
 	font-weight: var(--global--link-font-weight);
+	border-color: var(--global--color-primary);
+}
+
+.wp-block a:hover:not(.wp-block-button__link),
+.entry-content a:hover:not(.wp-block-button__link) {
+	border-color: transparent;
 }
 
 .has-main-navigation .site-header {
@@ -291,6 +298,9 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	.site-header .primary-navigation .primary-menu-container a {
 		color: var(--primary-nav--dropdown-color-link);
 	}
+	.site-header .primary-navigation .social-navigation a {
+		color: var(--primary-nav--dropdown-color-link);
+	}
 }
 
 .site-header .primary-navigation button#primary-close-menu {

+ 12 - 2
spearhead/style.css

@@ -7,7 +7,7 @@ Description: Share your podcast with the world using Spearhead.
 Requires at least: 5.5
 Tested up to: 5.5
 Requires PHP: 5.6.2
-Version: 1.2.2
+Version: 1.2.3
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: seedlet
@@ -197,13 +197,20 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	transition: all 0.1s ease;
 }
 
-.has-link-color a:hover:not(.wp-block-button__link), a:hover:not(.wp-block-button__link) {
+.has-link-color a:hover:not(.wp-block-button__link):not(.wp-block-file__button), a:hover:not(.wp-block-button__link):not(.wp-block-file__button) {
 	color: var(--global--color-primary-hover);
 	border-bottom: 1px solid var(--global--color-primary-hover);
 }
 
+.wp-block a,
 .entry-content a {
 	font-weight: var(--global--link-font-weight);
+	border-color: var(--global--color-primary);
+}
+
+.wp-block a:hover:not(.wp-block-button__link),
+.entry-content a:hover:not(.wp-block-button__link) {
+	border-color: transparent;
 }
 
 .has-main-navigation .site-header {
@@ -291,6 +298,9 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	.site-header .primary-navigation .primary-menu-container a {
 		color: var(--primary-nav--dropdown-color-link);
 	}
+	.site-header .primary-navigation .social-navigation a {
+		color: var(--primary-nav--dropdown-color-link);
+	}
 }
 
 .site-header .primary-navigation button#primary-close-menu {

文件差异内容过多而无法显示
+ 0 - 0
spearhead/style.css.map


部分文件因为文件数量过多而无法显示