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

Modern business: Disable nav menu order if FSE is enabled (#1221)

- Since we set the order of footer/header elements (like nav)
  in Gutenberg, we don't want the stylesheet to override it.
- Use the `.fse-enabled` selector to disable the order property
- This was causing the footer nav menu in FSE to show up at
  very bottom of the page, even if the user changed its order.
Noah Allen пре 5 година
родитељ
комит
e106be063e

+ 5 - 0
modern-business/sass/navigation/_menu-main-navigation.scss

@@ -6,6 +6,11 @@
 	margin-top: #{0.6 * $size__spacing-unit};
 	margin-top: #{0.6 * $size__spacing-unit};
 	order: 3;
 	order: 3;
 
 
+	body.fse-enabled & {
+		// With FSE, we want the placement of the nav menu to be set in gutenberg:
+		order: initial;
+	}
+
 	body.page & {
 	body.page & {
 		display: block;
 		display: block;
 	}
 	}

+ 4 - 0
modern-business/style-editor.css

@@ -258,6 +258,10 @@ Modern Business Editor Styles
 	 */
 	 */
 }
 }
 
 
+body.fse-enabled .main-navigation {
+  order: initial;
+}
+
 body.page .main-navigation {
 body.page .main-navigation {
   display: block;
   display: block;
 }
 }

+ 4 - 0
modern-business/style-rtl.css

@@ -1012,6 +1012,10 @@ a:focus {
 	 */
 	 */
 }
 }
 
 
+body.fse-enabled .main-navigation {
+  order: initial;
+}
+
 body.page .main-navigation {
 body.page .main-navigation {
   display: block;
   display: block;
 }
 }

+ 4 - 0
modern-business/style.css

@@ -1012,6 +1012,10 @@ a:focus {
 	 */
 	 */
 }
 }
 
 
+body.fse-enabled .main-navigation {
+  order: initial;
+}
+
 body.page .main-navigation {
 body.page .main-navigation {
   display: block;
   display: block;
 }
 }