Explorar o código

defaults for featured image

Maggie %!s(int64=4) %!d(string=hai) anos
pai
achega
5fa22e69d2
Modificáronse 2 ficheiros con 44 adicións e 0 borrados
  1. 26 0
      quadrat/assets/theme.css
  2. 18 0
      quadrat/sass/block-styles/_query.scss

+ 26 - 0
quadrat/assets/theme.css

@@ -85,6 +85,28 @@
 	flex-basis: auto;
 }
 
+.is-style-quadrat-diamond-posts .wp-block-column:last-child {
+	max-width: 400px;
+	flex-shrink: 0;
+}
+
+.is-style-quadrat-diamond-posts .wp-block-post-featured-image {
+	width: 400px;
+}
+
+@media (max-width: 599px) {
+	.is-style-quadrat-diamond-posts .wp-block-post-featured-image {
+		width: 100%;
+	}
+}
+
+.is-style-quadrat-diamond-posts .wp-block-post-featured-image img {
+	-o-object-fit: cover;
+	   object-fit: cover;
+	width: 100%;
+	height: 400px;
+}
+
 .is-style-quadrat-diamond-posts .wp-block-post-template li {
 	display: flex;
 	align-items: center;
@@ -92,6 +114,10 @@
 	position: relative;
 }
 
+.is-style-quadrat-diamond-posts .wp-block-post-template li > * {
+	flex-basis: 100%;
+}
+
 .is-style-quadrat-diamond-posts .wp-block-post-template li:before {
 	content: "";
 	background: var(--wp--preset--color--secondary);

+ 18 - 0
quadrat/sass/block-styles/_query.scss

@@ -1,6 +1,21 @@
 .is-style-quadrat-diamond-posts {
 	.wp-block-column {
 		flex-basis: auto;
+		&:last-child {
+			max-width: 400px;
+			flex-shrink: 0;
+		}
+	}
+	.wp-block-post-featured-image {
+		width: 400px;
+		@media (max-width: #{ ($break-small - 1) }) {
+			width: 100%;
+		}
+		img {
+			object-fit: cover;
+			width: 100%;
+			height: 400px;
+		}
 	}
 	.wp-block-post-template {
 		li {
@@ -8,6 +23,9 @@
 			align-items: center;
 			min-height: 400px;
 			position: relative;
+			& > * {
+				flex-basis: 100%;
+			}
 			&:before {
 				content: "";
 				background: var(--wp--preset--color--secondary);