فهرست منبع

Sophisticated Business: Add styling for the Header block

Danny Dudzic 6 سال پیش
والد
کامیت
6ad6598e54

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 220 - 220
sophisticated-business/package-lock.json


+ 1 - 1
sophisticated-business/package.json

@@ -36,7 +36,7 @@
     "build:style": "node-sass style.scss style.css --output-style expanded && postcss -r style.css",
     "build:style-editor": "node-sass style-editor.scss style-editor.css --output-style expanded && postcss -r style-editor.css",
     "build:style-editor-customizer": "node-sass style-editor-customizer.scss style-editor-customizer.css --output-style expanded && postcss -r style-editor-customizer.css",
-     "build:style-jetpack": "node-sass style-jetpack.scss style-jetpack.css --output-style expanded && postcss -r style-jetpack.css",
+    "build:style-jetpack": "node-sass style-jetpack.scss style-jetpack.css --output-style expanded && postcss -r style-jetpack.css",
     "build:rtl": "rtlcss style.css style-rtl.css",
     "build:print": "node-sass print.scss print.css --output-style expanded && postcss -r print.css",
     "build": "run-p \"build:*\"",

+ 64 - 0
sophisticated-business/sass/blocks/_site-builder.scss

@@ -0,0 +1,64 @@
+/* !Site Builder styles */
+
+.entry .entry-content {
+
+	.site-builder__header {
+		align-items: center;
+		color: $color__text-light;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		line-height: 1.25;
+		position: relative;
+		display: flex;
+
+		left: calc( -#{$size__spacing-unit } + 1em );
+		width: calc( 100% + (2 * #{$size__spacing-unit}) - 2em );
+		max-width: calc( 100% + (2 * #{$size__spacing-unit}) + 2em );
+
+		@include media(tablet) {
+			left: calc( -12.5% - 75px + 1em );
+			width: calc( 125% + 150px - 2em );
+			max-width: calc( 125% + 150px + 2em );
+		}
+	}
+
+	// Site title
+
+	.site-builder__title {
+		color: $color__text-main;
+		flex: 1 1 auto;
+		font-family: $font__heading;
+		font-size: $font__size-md;
+		font-weight: 600;
+		letter-spacing: 0;
+		line-height: $font__line-height-heading;
+		margin: 0;
+		-webkit-font-smoothing: antialiased;
+		-moz-osx-font-smoothing: grayscale;
+
+		a {
+			color: $color__text-main;
+			text-decoration: none;
+
+			&:link,
+			&:visited {
+				color: $color__text-main;
+			}
+
+			&:hover {
+				color: $color__text-hover;
+			}
+		}
+	}
+
+	// Site description
+
+	.site-builder__description {
+		flex: initial;
+		color: $color__text-main;
+		font-size: $font__size-xs;
+		font-weight: normal;
+		margin: 0.27rem 0 0;
+	}
+
+}

+ 125 - 0
sophisticated-business/style-rtl.css

@@ -1239,6 +1239,17 @@ body.page .main-navigation {
   margin-left: calc( .25 * 1rem);
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu {
+  display: block;
+  right: 0;
+  margin-top: 0;
+  opacity: 1;
+  width: auto;
+  min-width: 100%;
+  /* Non-mobile position */
+  /* Nested sub-menu dashes */
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu {
   display: block;
   right: 0;
@@ -1251,6 +1262,21 @@ body.page .main-navigation {
 }
 
 @media only screen and (min-width: 768px) {
+  .main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu {
+    display: block;
+    margin-top: 0;
+    opacity: 1;
+    position: absolute;
+    right: 0;
+    left: auto;
+    top: auto;
+    bottom: auto;
+    height: auto;
+    min-width: -moz-max-content;
+    min-width: -webkit-max-content;
+    min-width: max-content;
+    transform: none;
+  }
   .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu {
     display: block;
     margin-top: 0;
@@ -1268,6 +1294,13 @@ body.page .main-navigation {
   }
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu.hidden-links {
+  right: 0;
+  width: 100%;
+  display: table;
+  position: absolute;
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu.hidden-links {
   right: 0;
   width: 100%;
@@ -1276,6 +1309,12 @@ body.page .main-navigation {
 }
 
 @media only screen and (min-width: 768px) {
+  .main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu.hidden-links {
+    left: 0;
+    right: auto;
+    display: block;
+    width: max-content;
+  }
   .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu.hidden-links {
     left: 0;
     right: auto;
@@ -1284,10 +1323,24 @@ body.page .main-navigation {
   }
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu .submenu-expand {
+  display: none;
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu .submenu-expand {
   display: none;
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu .sub-menu {
+  display: block;
+  margin-top: inherit;
+  position: relative;
+  width: 100%;
+  right: 0;
+  opacity: 1;
+  /* Non-mobile position */
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu .sub-menu {
   display: block;
   margin-top: inherit;
@@ -1299,16 +1352,31 @@ body.page .main-navigation {
 }
 
 @media only screen and (min-width: 768px) {
+  .main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu .sub-menu {
+    float: none;
+    max-width: 100%;
+  }
   .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu .sub-menu {
     float: none;
     max-width: 100%;
   }
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu .sub-menu {
+  counter-reset: submenu;
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu .sub-menu {
   counter-reset: submenu;
 }
 
+.main-navigation .main-menu .menu-item-has-children:not(.off-canvas)[focus-within] > .sub-menu .sub-menu > li > a::before {
+  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-weight: normal;
+  content: "– " counters(submenu, "– ", none);
+  counter-increment: submenu;
+}
+
 .main-navigation .main-menu .menu-item-has-children:not(.off-canvas):focus-within > .sub-menu .sub-menu > li > a::before {
   font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
   font-weight: normal;
@@ -4410,6 +4478,63 @@ body.page .main-navigation {
   color: #FFF;
 }
 
+/* Site Builder */
+/* !Site Builder styles */
+.entry .entry-content .site-builder__header {
+  align-items: center;
+  color: #cccccc;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  line-height: 1.25;
+  position: relative;
+  display: flex;
+  right: -1rem;
+  width: calc( 100% + (2 * 1rem));
+  max-width: calc( 100% + (2 * 1rem));
+}
+
+@media only screen and (min-width: 768px) {
+  .entry .entry-content .site-builder__header {
+    right: calc( -12.5% - 75px + 1em);
+    width: calc( 125% + 150px - 2em);
+    max-width: calc( 125% + 150px + 2em);
+  }
+}
+
+.entry .entry-content .site-builder__title {
+  color: #fff;
+  flex: 1 1 auto;
+  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-size: 1.125em;
+  font-weight: 600;
+  letter-spacing: 0;
+  line-height: 1.2;
+  margin: 0;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.entry .entry-content .site-builder__title a {
+  color: #fff;
+  text-decoration: none;
+}
+
+.entry .entry-content .site-builder__title a:link, .entry .entry-content .site-builder__title a:visited {
+  color: #fff;
+}
+
+.entry .entry-content .site-builder__title a:hover {
+  color: #c6c6c6;
+}
+
+.entry .entry-content .site-builder__description {
+  flex: initial;
+  color: #fff;
+  font-size: 0.71111em;
+  font-weight: normal;
+  margin: 0.27rem 0 0;
+}
+
 /* Media */
 .page-content .wp-smiley,
 .entry-content .wp-smiley,

+ 57 - 0
sophisticated-business/style.css

@@ -4490,6 +4490,63 @@ body.page .main-navigation {
   color: #FFF;
 }
 
+/* Site Builder */
+/* !Site Builder styles */
+.entry .entry-content .site-builder__header {
+  align-items: center;
+  color: #cccccc;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  line-height: 1.25;
+  position: relative;
+  display: flex;
+  left: calc( -1rem + 1em);
+  width: calc( 100% + (2 * 1rem) - 2em);
+  max-width: calc( 100% + (2 * 1rem) + 2em);
+}
+
+@media only screen and (min-width: 768px) {
+  .entry .entry-content .site-builder__header {
+    left: calc( -12.5% - 75px + 1em);
+    width: calc( 125% + 150px - 2em);
+    max-width: calc( 125% + 150px + 2em);
+  }
+}
+
+.entry .entry-content .site-builder__title {
+  color: #fff;
+  flex: 1 1 auto;
+  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-size: 1.125em;
+  font-weight: 600;
+  letter-spacing: 0;
+  line-height: 1.2;
+  margin: 0;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.entry .entry-content .site-builder__title a {
+  color: #fff;
+  text-decoration: none;
+}
+
+.entry .entry-content .site-builder__title a:link, .entry .entry-content .site-builder__title a:visited {
+  color: #fff;
+}
+
+.entry .entry-content .site-builder__title a:hover {
+  color: #c6c6c6;
+}
+
+.entry .entry-content .site-builder__description {
+  flex: initial;
+  color: #fff;
+  font-size: 0.71111em;
+  font-weight: normal;
+  margin: 0.27rem 0 0;
+}
+
 /* Media */
 .page-content .wp-smiley,
 .entry-content .wp-smiley,

+ 4 - 0
sophisticated-business/style.scss

@@ -105,6 +105,10 @@ Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
 
 @import "sass/blocks/blocks";
 
+/* Site Builder */
+
+@import "sass/blocks/site-builder";
+
 /* Media */
 
 @import "sass/media/media";

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است