Selaa lähdekoodia

Seedlet: Fix navigation block styles in editor (#5199)

* Remove background & margins from nav in editor

* Always set hover color to currentColor

* Set line height when there is a background color

* Move hover styles to wp-block-navigation-item

* Remove border from nav links in editor

* Remove editor stylesheet for nav block
Sarah Norris 3 vuotta sitten
vanhempi
commit
58617b3188

+ 0 - 27
seedlet/assets/css/style-editor.css

@@ -897,33 +897,6 @@ dt {
 	font-weight: bold;
 }
 
-.wp-block-navigation .wp-block-navigation__container {
-	background: var(--global--color-background);
-	padding: 0;
-}
-
-.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__content {
-	padding: var(--primary-nav--padding);
-}
-
-.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__label {
-	font-family: var(--primary-nav--font-family);
-	font-size: var(--primary-nav--font-size);
-	font-weight: var(--primary-nav--font-weight);
-}
-
-.wp-block-navigation .has-child .wp-block-navigation__container {
-	box-shadow: var(--global--elevation);
-}
-
-.wp-block-navigation:not(.has-text-color) .wp-block-navigation-link > a:hover, .wp-block-navigation:not(.has-text-color) .wp-block-navigation-link > a:focus {
-	color: var(--primary-nav--color-link-hover);
-}
-
-.wp-block-navigation:not(.has-text-color) .wp-block-navigation-link__content {
-	color: currentColor;
-}
-
 p {
 	line-height: var(--wp--typography--line-height, --global--line-height-body);
 }

+ 0 - 1
seedlet/assets/sass/blocks/_editor.scss

@@ -17,7 +17,6 @@
 @import "latest-posts/editor";
 @import "legacy/editor"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc.
 @import "list/editor";
-@import "navigation/editor";
 @import "paragraph/editor";
 @import "posts-list/editor";
 @import "pullquote/editor";

+ 0 - 38
seedlet/assets/sass/blocks/navigation/_editor.scss

@@ -1,38 +0,0 @@
-.wp-block-navigation {
-    .wp-block-navigation__container {
-        background: var(--global--color-background);
-        padding: 0;
-    }
-
-    .wp-block-navigation-link {
-        .wp-block-navigation-link__content {
-            padding: var(--primary-nav--padding);
-        }
-
-        .wp-block-navigation-link__label {
-            font-family: var(--primary-nav--font-family);
-            font-size: var(--primary-nav--font-size);
-            font-weight: var(--primary-nav--font-weight);
-        }
-    }
-
-    .has-child {
-        .wp-block-navigation__container {
-            box-shadow: var(--global--elevation);
-        }
-    }
-    
-    &:not(.has-text-color){
-        .wp-block-navigation-link {
-            > a {
-                &:hover, &:focus {
-                    color: var(--primary-nav--color-link-hover);
-                }
-            }
-        }
-
-        .wp-block-navigation-link__content {
-            color: currentColor;
-        }
-    }
-}