Jelajahi Sumber

Varia: Resolving conflicts with master

Allan Cole 6 tahun lalu
induk
melakukan
00a1b2cea4

+ 42 - 9
friendly-business/style-editor.css

@@ -849,6 +849,15 @@ blockquote {
   }
 }
 
+/** === Helper Functions === */
+/**
+ Given a string, $alignment, returns the nested FSE block selectors
+ required for Full Site Editing to look correct. If $alignment is given,
+ we use it to target wp-blocks with a matching data-align attribute.
+ If no alignment is given, we target the base wp-block class. In both
+ of these scenarios, we target top level blocks, and any top level blocks
+ inside one of the FSE template part blocks.
+ */
 /** === Editor Frame === */
 body {
   background: #fffdf6;
@@ -859,7 +868,9 @@ body .wp-block[data-align="full"] {
 }
 
 @media only screen and (min-width: 600px) {
-  body .wp-block[data-align="full"] {
+  
+  body .wp-block[data-align="full"],
+  body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="full"] {
     width: calc( 100% + 90px);
     max-width: calc( 100% + 90px);
   }
@@ -876,41 +887,63 @@ body .wp-block[data-align="full"] {
     margin-left: 0;
     margin-right: 0;
   }
-  body .wp-block[data-align="wide"] {
+  
+  body .wp-block[data-align="wide"],
+  body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="wide"] {
     width: 100%;
   }
-  body .wp-block[data-align="full"] {
+  
+  body .wp-block[data-align="full"],
+  body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="full"] {
     position: relative;
     left: calc( -12.5% - 14px);
     width: calc( 125% + 116px);
     max-width: calc( 125% + 115px);
   }
-  body .wp-block[data-align="right"] {
+  
+  body .wp-block[data-align="right"],
+  body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="right"] {
     max-width: 125%;
   }
 }
 
 /** === Content Width === */
 .wp-block {
-  width: calc(100vw - (2 * 1rem));
-  max-width: 100%;
   margin-left: auto;
   margin-right: auto;
 }
 
+
+.wp-block,
+.wp-block[data-type="a8c/post-content"] .wp-block {
+  width: calc(100vw - (2 * 1rem));
+  max-width: 100%;
+}
+
 @media only screen and (min-width: 768px) {
-  .wp-block {
+  
+  .wp-block,
+  .wp-block[data-type="a8c/post-content"] .wp-block {
     width: calc(8 * (100vw / 12));
   }
 }
 
 @media only screen and (min-width: 1168px) {
-  .wp-block {
+  
+  .wp-block,
+  .wp-block[data-type="a8c/post-content"] .wp-block {
     width: calc(6 * (100vw / 12 ));
   }
 }
 
-.wp-block .wp-block {
+
+.wp-block .wp-block,
+.wp-block[data-type="a8c/post-content"] .wp-block .wp-block {
+  width: 100%;
+}
+
+/** === FSE Template Part Blocks === */
+.wp-block[data-type="a8c/post-content"] {
   width: 100%;
 }
 

+ 35 - 7
friendly-business/style-editor.scss

@@ -10,6 +10,27 @@ Friendly Business Editor Styles
 @import "sass/navigation/menu-main-navigation";
 @import "sass/typography/headings";
 
+/** === Helper Functions === */
+
+/**
+ Given a string, $alignment, returns the nested FSE block selectors
+ required for Full Site Editing to look correct. If $alignment is given,
+ we use it to target wp-blocks with a matching data-align attribute.
+ If no alignment is given, we target the base wp-block class. In both
+ of these scenarios, we target top level blocks, and any top level blocks
+ inside one of the FSE template part blocks.
+ */
+ @function get-block-selector($alignment) {
+	$main-block-selector: ".wp-block";
+	@if $alignment != "" {
+		$main-block-selector: ".wp-block[data-align=\"#{$alignment}\"]";
+	}
+
+	@return "
+	  #{$main-block-selector},
+	  .wp-block[data-type=\"a8c/post-content\"] #{$main-block-selector}";
+}
+
 /** === Editor Frame === */
 
 body {
@@ -20,8 +41,7 @@ body {
 	}
 
 	@include media(mobile) {
-
-		.wp-block[data-align="full"] {
+		#{get-block-selector("full")} {
 			width: calc( 100% + 90px );
 			max-width: calc( 100% + 90px );
 		}
@@ -41,18 +61,18 @@ body {
 			margin-right: 0;
 		}
 
-		.wp-block[data-align="wide"] {
+		#{get-block-selector("wide")} {
 			width: 100%;
 		}
 
-		.wp-block[data-align="full"] {
+		#{get-block-selector("full")} {
 			position: relative;
 			left: calc( -12.5% - 14px );
 			width: calc( 125% + 116px );
 			max-width: calc( 125% + 115px ); // Subtract 1px here to avoid the rounding errors that happen due to the usage of percentages.
 		}
 
-		.wp-block[data-align="right"] {
+		#{get-block-selector("right")} {
 			max-width: 125%;
 		}
 	}
@@ -61,10 +81,13 @@ body {
 /** === Content Width === */
 
 .wp-block {
-	width: calc(100vw - (2 * #{$size__spacing-unit}));
-	max-width: 100%;
 	margin-left: auto;
 	margin-right: auto;
+}
+
+#{get-block-selector("")} {
+	width: calc(100vw - (2 * #{$size__spacing-unit}));
+	max-width: 100%;
 
 	@include media(tablet) {
 		width: calc(8 * (100vw / 12));
@@ -80,6 +103,11 @@ body {
 	}
 }
 
+/** === FSE Template Part Blocks === */
+.wp-block[data-type="a8c/post-content"] {
+	width: 100%;
+}
+
 /** === Base Typography === */
 
 body {

+ 12 - 0
modern-business/sass/navigation/_menu-footer-navigation.scss

@@ -19,4 +19,16 @@
 		}
 	}
 
+}
+
+footer {
+
+	.wp-block-a8c-navigation-menu {
+
+		.sub-menu {
+			visibility: hidden;
+		}
+
+	}
+
 }

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

@@ -139,6 +139,25 @@
 		}
 	}
 
+	.default-menu {
+		> li {
+			> a {
+				margin-right: #{1 * $size__spacing-unit};
+			}
+
+			&.menu-item-has-children {
+				> a {
+					margin-right: #{1 * $size__spacing-unit};
+				}
+			}
+
+			&:last-child > a,
+			&:last-child.menu-item-has-children .submenu-expand {
+				margin-right: 0;
+			}
+		}
+	}
+
 	.sub-menu {
 
 		background-color: $color__link;

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

@@ -371,6 +371,19 @@ body.page .main-navigation {
   margin-right: 0;
 }
 
+.main-navigation .default-menu > li > a {
+  margin-right: 1rem;
+}
+
+.main-navigation .default-menu > li.menu-item-has-children > a {
+  margin-right: 1rem;
+}
+
+.main-navigation .default-menu > li:last-child > a,
+.main-navigation .default-menu > li:last-child.menu-item-has-children .submenu-expand {
+  margin-right: 0;
+}
+
 .main-navigation .sub-menu {
   background-color: #c43d80;
   color: #fff;

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

@@ -1134,6 +1134,19 @@ body.page .main-navigation {
   margin-left: 0;
 }
 
+.main-navigation .default-menu > li > a {
+  margin-left: 1rem;
+}
+
+.main-navigation .default-menu > li.menu-item-has-children > a {
+  margin-left: 1rem;
+}
+
+.main-navigation .default-menu > li:last-child > a,
+.main-navigation .default-menu > li:last-child.menu-item-has-children .submenu-expand {
+  margin-left: 0;
+}
+
 .main-navigation .sub-menu {
   background-color: #c43d80;
   color: #fff;
@@ -1583,6 +1596,10 @@ body.page .main-navigation {
   margin-left: 1rem;
 }
 
+footer .wp-block-a8c-navigation-menu .sub-menu {
+  visibility: hidden;
+}
+
 /*--------------------------------------------------------------
 ## Next / Previous
 --------------------------------------------------------------*/

+ 17 - 0
modern-business/style.css

@@ -1134,6 +1134,19 @@ body.page .main-navigation {
   margin-right: 0;
 }
 
+.main-navigation .default-menu > li > a {
+  margin-right: 1rem;
+}
+
+.main-navigation .default-menu > li.menu-item-has-children > a {
+  margin-right: 1rem;
+}
+
+.main-navigation .default-menu > li:last-child > a,
+.main-navigation .default-menu > li:last-child.menu-item-has-children .submenu-expand {
+  margin-right: 0;
+}
+
 .main-navigation .sub-menu {
   background-color: #c43d80;
   color: #fff;
@@ -1583,6 +1596,10 @@ body.page .main-navigation {
   margin-right: 1rem;
 }
 
+footer .wp-block-a8c-navigation-menu .sub-menu {
+  visibility: hidden;
+}
+
 /*--------------------------------------------------------------
 ## Next / Previous
 --------------------------------------------------------------*/

+ 8 - 2
redhill/style-rtl.css

@@ -1412,9 +1412,10 @@ h6, .h6 {
 }
 
 img {
-	width: auto;
-	vertical-align: middle;
+	height: auto;
 	max-width: 100%;
+	vertical-align: middle;
+	width: auto;
 }
 
 .wp-block-latest-comments {
@@ -1763,6 +1764,11 @@ hr.is-style-dots:before {
 	padding-right: 0.83333rem;
 }
 
+.wp-block-jetpack-slideshow ul {
+	margin-right: 0;
+	margin-left: 0;
+}
+
 .wp-block-spacer {
 	display: block;
 	margin-bottom: 0;

+ 3 - 2
redhill/style.css

@@ -1412,9 +1412,10 @@ h6, .h6 {
 }
 
 img {
-	width: auto;
-	vertical-align: middle;
+	height: auto;
 	max-width: 100%;
+	vertical-align: middle;
+	width: auto;
 }
 
 .wp-block-latest-comments {

+ 2 - 1
varia/sass/blocks/image/_style.scss

@@ -12,6 +12,7 @@
 
 img {
 	height: auto;
-	vertical-align: middle;
 	max-width: 100%;
+	vertical-align: middle;
+	width: auto;
 }

+ 2 - 1
varia/style-rtl.css

@@ -1372,8 +1372,9 @@ h6, .h6 {
 
 img {
 	height: auto;
-	vertical-align: middle;
 	max-width: 100%;
+	vertical-align: middle;
+	width: auto;
 }
 
 .wp-block-latest-comments {

+ 2 - 1
varia/style.css

@@ -1372,8 +1372,9 @@ h6, .h6 {
 
 img {
 	height: auto;
-	vertical-align: middle;
 	max-width: 100%;
+	vertical-align: middle;
+	width: auto;
 }
 
 .wp-block-latest-comments {