浏览代码

Merge branch 'master' into fix/issue-1407

Allan Cole 5 年之前
父节点
当前提交
3f5b593b4b

+ 1 - 1
varia/functions.php

@@ -50,7 +50,7 @@ if ( ! function_exists( 'varia_setup' ) ) :
 		 *
 		 *
 		 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
 		 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
 		 */
 		 */
-		add_theme_support( 'post-thumbnails' );
+		add_theme_support( 'post-thumbnails', array( 'post' ) );
 		set_post_thumbnail_size( 1568, 9999 );
 		set_post_thumbnail_size( 1568, 9999 );
 
 
 		// This theme uses wp_nav_menu() in two locations.
 		// This theme uses wp_nav_menu() in two locations.

+ 1 - 0
varia/sass/blocks/_editor.scss

@@ -14,6 +14,7 @@
 @import "image/editor";
 @import "image/editor";
 @import "gallery/editor";
 @import "gallery/editor";
 @import "group/editor";
 @import "group/editor";
+@import "latest-comments/editor";
 @import "latest-posts/editor";
 @import "latest-posts/editor";
 @import "list/editor";
 @import "list/editor";
 @import "media-text/editor";
 @import "media-text/editor";

+ 3 - 0
varia/sass/blocks/latest-comments/_editor.scss

@@ -0,0 +1,3 @@
+.wp-block-latest-comments {
+	margin-left: 0;
+}

+ 1 - 1
varia/sass/blocks/latest-comments/_style.scss

@@ -1,5 +1,5 @@
 .wp-block-latest-comments {
 .wp-block-latest-comments {
-	margin-left: 0;
+	padding-left: 0;
 
 
 	.wp-block-latest-comments__comment {
 	.wp-block-latest-comments__comment {
 		font-size: #{map-deep-get($config-global, "font", "size", "sm")};
 		font-size: #{map-deep-get($config-global, "font", "size", "sm")};

+ 1 - 1
varia/sass/blocks/latest-posts/_style.scss

@@ -1,5 +1,5 @@
 .wp-block-latest-posts {
 .wp-block-latest-posts {
-	margin-left: 0;
+	padding-left: 0;
 
 
 	& > li {
 	& > li {
 		/* Vertical margins logic */
 		/* Vertical margins logic */

+ 7 - 0
varia/sass/blocks/list/_editor.scss

@@ -4,4 +4,11 @@
 		margin: #{map-deep-get($config-global, "spacing", "vertical")} 0;
 		margin: #{map-deep-get($config-global, "spacing", "vertical")} 0;
 		padding-left: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
 		padding-left: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
 	}
 	}
+
+	li {
+		> ul,
+		> ol {
+			margin: 0;
+		}
+	}
 }
 }

+ 3 - 3
varia/sass/components/comments/_comments.scss

@@ -46,7 +46,7 @@
 
 
 .comment-list {
 .comment-list {
 	border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
 	border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
-	margin-left: 0;
+	padding-left: 0;
 	list-style: none;
 	list-style: none;
 
 
 	> li {
 	> li {
@@ -58,7 +58,7 @@
 
 
 .children {
 .children {
 	list-style: none;
 	list-style: none;
-	margin-left: #{map-deep-get($config-global, "spacing", "horizontal")};
+	padding-left: #{map-deep-get($config-global, "spacing", "horizontal")};
 
 
 	> li {
 	> li {
 		border-top: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
 		border-top: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
@@ -67,7 +67,7 @@
 	}
 	}
 
 
 	@include media(mobile) {
 	@include media(mobile) {
-		margin-left: calc(2 * #{map-deep-get($config-global, "spacing", "horizontal")});
+		padding-left: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
 	}
 	}
 }
 }
 
 

+ 5 - 0
varia/sass/components/header/_site-main-navigation.scss

@@ -63,8 +63,13 @@
 		list-style: none;
 		list-style: none;
 		margin: 0;
 		margin: 0;
 		max-width: none;
 		max-width: none;
+		padding-left: 0;
 		position: relative;
 		position: relative;
 
 
+		ul {
+			padding-left: 0;
+		}
+
 		li {
 		li {
 			display: block;
 			display: block;
 			position: relative;
 			position: relative;

+ 1 - 0
varia/sass/components/header/_site-social-navigation.scss

@@ -7,6 +7,7 @@
 		display: flex;
 		display: flex;
 		list-style: none;
 		list-style: none;
 		margin: 0;
 		margin: 0;
+		padding-left: 0;
 
 
 		& > li:first-of-type > a {
 		& > li:first-of-type > a {
 			padding-left: 0;
 			padding-left: 0;

+ 15 - 0
varia/style-editor.css

@@ -424,6 +424,10 @@ object {
 	width: 100%;
 	width: 100%;
 }
 }
 
 
+.wp-block-latest-comments {
+	margin-left: 0;
+}
+
 .wp-block-latest-posts {
 .wp-block-latest-posts {
 	padding-left: 0;
 	padding-left: 0;
 }
 }
@@ -473,6 +477,11 @@ object {
 	padding-left: 32px;
 	padding-left: 32px;
 }
 }
 
 
+.block-library-list li > ul,
+.block-library-list li > ol {
+	margin: 0;
+}
+
 .wp-block-media-text .block-editor-inner-blocks {
 .wp-block-media-text .block-editor-inner-blocks {
 	padding-right: 16px;
 	padding-right: 16px;
 	padding-left: 16px;
 	padding-left: 16px;
@@ -1013,10 +1022,15 @@ table th,
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
 	max-width: none;
 	max-width: none;
+	padding-left: 0;
 	position: relative;
 	position: relative;
 	/* Sub-menus Flyout */
 	/* Sub-menus Flyout */
 }
 }
 
 
+.main-navigation > div > ul ul {
+	padding-left: 0;
+}
+
 .main-navigation > div > ul li {
 .main-navigation > div > ul li {
 	display: block;
 	display: block;
 	position: relative;
 	position: relative;
@@ -1172,6 +1186,7 @@ table th,
 	display: flex;
 	display: flex;
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
+	padding-left: 0;
 }
 }
 
 
 .social-navigation > div > ul > li:first-of-type > a {
 .social-navigation > div > ul > li:first-of-type > a {

+ 11 - 5
varia/style-rtl.css

@@ -1453,7 +1453,7 @@ img {
 }
 }
 
 
 .wp-block-latest-comments {
 .wp-block-latest-comments {
-	margin-right: 0;
+	padding-right: 0;
 }
 }
 
 
 .wp-block-latest-comments .wp-block-latest-comments__comment {
 .wp-block-latest-comments .wp-block-latest-comments__comment {
@@ -1488,7 +1488,7 @@ img {
 }
 }
 
 
 .wp-block-latest-posts {
 .wp-block-latest-posts {
-	margin-right: 0;
+	padding-right: 0;
 }
 }
 
 
 .wp-block-latest-posts > li {
 .wp-block-latest-posts > li {
@@ -2379,10 +2379,15 @@ table th,
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
 	max-width: none;
 	max-width: none;
+	padding-right: 0;
 	position: relative;
 	position: relative;
 	/* Sub-menus Flyout */
 	/* Sub-menus Flyout */
 }
 }
 
 
+.main-navigation > div > ul ul {
+	padding-right: 0;
+}
+
 .main-navigation > div > ul li {
 .main-navigation > div > ul li {
 	display: block;
 	display: block;
 	position: relative;
 	position: relative;
@@ -2538,6 +2543,7 @@ table th,
 	display: flex;
 	display: flex;
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
+	padding-right: 0;
 }
 }
 
 
 .social-navigation > div > ul > li:first-of-type > a {
 .social-navigation > div > ul > li:first-of-type > a {
@@ -2889,7 +2895,7 @@ table th,
  */
  */
 .comment-list {
 .comment-list {
 	border-bottom: 1px solid #DDDDDD;
 	border-bottom: 1px solid #DDDDDD;
-	margin-right: 0;
+	padding-right: 0;
 	list-style: none;
 	list-style: none;
 }
 }
 
 
@@ -2901,7 +2907,7 @@ table th,
 
 
 .children {
 .children {
 	list-style: none;
 	list-style: none;
-	margin-right: 16px;
+	padding-right: 16px;
 }
 }
 
 
 .children > li {
 .children > li {
@@ -2912,7 +2918,7 @@ table th,
 
 
 @media only screen and (min-width: 560px) {
 @media only screen and (min-width: 560px) {
 	.children {
 	.children {
-		margin-right: calc(2 * 16px);
+		padding-right: 32px;
 	}
 	}
 }
 }
 
 

+ 11 - 5
varia/style.css

@@ -1453,7 +1453,7 @@ img {
 }
 }
 
 
 .wp-block-latest-comments {
 .wp-block-latest-comments {
-	margin-left: 0;
+	padding-left: 0;
 }
 }
 
 
 .wp-block-latest-comments .wp-block-latest-comments__comment {
 .wp-block-latest-comments .wp-block-latest-comments__comment {
@@ -1488,7 +1488,7 @@ img {
 }
 }
 
 
 .wp-block-latest-posts {
 .wp-block-latest-posts {
-	margin-left: 0;
+	padding-left: 0;
 }
 }
 
 
 .wp-block-latest-posts > li {
 .wp-block-latest-posts > li {
@@ -2396,10 +2396,15 @@ table th,
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
 	max-width: none;
 	max-width: none;
+	padding-left: 0;
 	position: relative;
 	position: relative;
 	/* Sub-menus Flyout */
 	/* Sub-menus Flyout */
 }
 }
 
 
+.main-navigation > div > ul ul {
+	padding-left: 0;
+}
+
 .main-navigation > div > ul li {
 .main-navigation > div > ul li {
 	display: block;
 	display: block;
 	position: relative;
 	position: relative;
@@ -2555,6 +2560,7 @@ table th,
 	display: flex;
 	display: flex;
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
+	padding-left: 0;
 }
 }
 
 
 .social-navigation > div > ul > li:first-of-type > a {
 .social-navigation > div > ul > li:first-of-type > a {
@@ -2906,7 +2912,7 @@ table th,
  */
  */
 .comment-list {
 .comment-list {
 	border-bottom: 1px solid #DDDDDD;
 	border-bottom: 1px solid #DDDDDD;
-	margin-left: 0;
+	padding-left: 0;
 	list-style: none;
 	list-style: none;
 }
 }
 
 
@@ -2918,7 +2924,7 @@ table th,
 
 
 .children {
 .children {
 	list-style: none;
 	list-style: none;
-	margin-left: 16px;
+	padding-left: 16px;
 }
 }
 
 
 .children > li {
 .children > li {
@@ -2929,7 +2935,7 @@ table th,
 
 
 @media only screen and (min-width: 560px) {
 @media only screen and (min-width: 560px) {
 	.children {
 	.children {
-		margin-left: calc(2 * 16px);
+		padding-left: 32px;
 	}
 	}
 }
 }