浏览代码

Exford: Rework Cover block height on small screens

Thomas Guillot 6 年之前
父节点
当前提交
84544212a5

+ 1 - 1
exford/sass/_config-child-theme-deep.scss

@@ -188,7 +188,7 @@ $config-button: (
  * Cover
  * Cover
  */
  */
 $config-cover: (
 $config-cover: (
-	"height": 80vh,
+	"height": #{15 * map-deep-get($config-global, "spacing", "vertical")},
 );
 );
 
 
 /**
 /**

+ 8 - 0
exford/sass/_extra-child-theme.scss

@@ -218,6 +218,14 @@ a {
 	h6 {
 	h6 {
 		font-size: #{map-deep-get($config-global, "font", "size", "md")};
 		font-size: #{map-deep-get($config-global, "font", "size", "md")};
 	}
 	}
+
+	@include media(mobile) {
+		min-height: 60vh;
+	}
+
+	@include media(laptop) {
+		min-height: 80vh;
+	}
 }
 }
 
 
 /**
 /**

+ 8 - 0
exford/sass/style-child-theme-editor.scss

@@ -65,4 +65,12 @@
 	h6 {
 	h6 {
 		font-size: #{map-deep-get($config-global, "font", "size", "md")};
 		font-size: #{map-deep-get($config-global, "font", "size", "md")};
 	}
 	}
+
+	@include media(mobile) {
+		min-height: 60vh;
+	}
+
+	@include media(laptop) {
+		min-height: 80vh;
+	}
 }
 }

+ 15 - 1
exford/style-editor.css

@@ -328,7 +328,7 @@ object {
 .wp-block-cover,
 .wp-block-cover,
 .wp-block-cover-image {
 .wp-block-cover-image {
 	background-color: #111111;
 	background-color: #111111;
-	min-height: 80vh;
+	min-height: 480px;
 	/* Treating H2 separately to account for legacy /core styles */
 	/* Treating H2 separately to account for legacy /core styles */
 }
 }
 
 
@@ -890,3 +890,17 @@ table th,
 .wp-block-cover-image h6 {
 .wp-block-cover-image h6 {
 	font-size: 1.2rem;
 	font-size: 1.2rem;
 }
 }
+
+@media only screen and (min-width: 560px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 60vh;
+	}
+}
+
+@media only screen and (min-width: 782px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 80vh;
+	}
+}

+ 15 - 1
exford/style-rtl.css

@@ -1213,7 +1213,7 @@ input.has-focus[type="submit"],
 .wp-block-cover,
 .wp-block-cover,
 .wp-block-cover-image {
 .wp-block-cover-image {
 	background-color: #111111;
 	background-color: #111111;
-	min-height: 80vh;
+	min-height: 480px;
 	margin: inherit;
 	margin: inherit;
 	/* Treating H2 separately to account for legacy /core styles */
 	/* Treating H2 separately to account for legacy /core styles */
 	/**
 	/**
@@ -3575,6 +3575,20 @@ p:not(.site-title) a:hover {
 	font-size: 1.2rem;
 	font-size: 1.2rem;
 }
 }
 
 
+@media only screen and (min-width: 560px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 60vh;
+	}
+}
+
+@media only screen and (min-width: 782px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 80vh;
+	}
+}
+
 /**
 /**
  * Widgets
  * Widgets
  */
  */

+ 15 - 1
exford/style.css

@@ -1213,7 +1213,7 @@ input.has-focus[type="submit"],
 .wp-block-cover,
 .wp-block-cover,
 .wp-block-cover-image {
 .wp-block-cover-image {
 	background-color: #111111;
 	background-color: #111111;
-	min-height: 80vh;
+	min-height: 480px;
 	margin: inherit;
 	margin: inherit;
 	/* Treating H2 separately to account for legacy /core styles */
 	/* Treating H2 separately to account for legacy /core styles */
 	/**
 	/**
@@ -3591,6 +3591,20 @@ p:not(.site-title) a:hover {
 	font-size: 1.2rem;
 	font-size: 1.2rem;
 }
 }
 
 
+@media only screen and (min-width: 560px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 60vh;
+	}
+}
+
+@media only screen and (min-width: 782px) {
+	.wp-block-cover,
+	.wp-block-cover-image {
+		min-height: 80vh;
+	}
+}
+
 /**
 /**
  * Widgets
  * Widgets
  */
  */