Преглед изворни кода

Simplify link selectors to avoid bleed

The link selectors were changed to apply a default border style to all
anchors (with a loose selector, just 'a') but leave that border-color
transparent.  All of these elements get a :hover to apply the primary
hover style.

Any anchor that's in wp-block or entry-content will instead have those
border color values inverted (defaults to --color-primary, hover is
transparent)

Buttons, social links (any other <a> that I found to evaluate) had more
specific selection rules to eliminate the border-bottom styles
preventing undesired underlines.
Jason Crist пре 4 година
родитељ
комит
753b7289c7
4 измењених фајлова са 20 додато и 18 уклоњено
  1. 8 8
      spearhead/assets/sass/_text.scss
  2. 6 5
      spearhead/style-rtl.css
  3. 6 5
      spearhead/style.css
  4. 0 0
      spearhead/style.css.map

+ 8 - 8
spearhead/assets/sass/_text.scss

@@ -1,19 +1,19 @@
 .has-link-color a, a {
-    border-bottom: 1px solid transparent;
+    border-bottom: 1px solid;
+    border-color: transparent;
     transition: all 0.1s ease;
 
-    &:hover:not(.wp-block-button__link):not(.wp-block-file__button) {
+    &:hover {
         color: var( --global--color-primary-hover );
-        border-bottom: 1px solid var( --global--color-primary-hover );
+        border-color: var( --global--color-primary-hover );
     }
 }
 
-.wp-block a, // Target the editor link styles also.
+.wp-block a,
 .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: var( --global--color-primary );
+    &:hover {
         border-color: transparent;
     }
-}
+}

+ 6 - 5
spearhead/style-rtl.css

@@ -193,13 +193,14 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 }
 
 .has-link-color a, a {
-	border-bottom: 1px solid transparent;
+	border-bottom: 1px solid;
+	border-color: transparent;
 	transition: all 0.1s ease;
 }
 
-.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) {
+.has-link-color a:hover, a:hover {
 	color: var(--global--color-primary-hover);
-	border-bottom: 1px solid var(--global--color-primary-hover);
+	border-color: var(--global--color-primary-hover);
 }
 
 .wp-block a,
@@ -208,8 +209,8 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	border-color: var(--global--color-primary);
 }
 
-.wp-block a:hover:not(.wp-block-button__link),
-.entry-content a:hover:not(.wp-block-button__link) {
+.wp-block a:hover,
+.entry-content a:hover {
 	border-color: transparent;
 }
 

+ 6 - 5
spearhead/style.css

@@ -193,13 +193,14 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 }
 
 .has-link-color a, a {
-	border-bottom: 1px solid transparent;
+	border-bottom: 1px solid;
+	border-color: transparent;
 	transition: all 0.1s ease;
 }
 
-.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) {
+.has-link-color a:hover, a:hover {
 	color: var(--global--color-primary-hover);
-	border-bottom: 1px solid var(--global--color-primary-hover);
+	border-color: var(--global--color-primary-hover);
 }
 
 .wp-block a,
@@ -208,8 +209,8 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	border-color: var(--global--color-primary);
 }
 
-.wp-block a:hover:not(.wp-block-button__link),
-.entry-content a:hover:not(.wp-block-button__link) {
+.wp-block a:hover,
+.entry-content a:hover {
 	border-color: transparent;
 }
 

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
spearhead/style.css.map


Неке датотеке нису приказане због велике количине промена