Browse Source

Varia: Reset side padding for list items

Takashi Irie 5 năm trước cách đây
mục cha
commit
691d1c96cb

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

@@ -13,6 +13,7 @@
 @import "heading/editor";
 @import "gallery/editor";
 @import "group/editor";
+@import "latest-comments/editor";
 @import "latest-posts/editor";
 @import "list/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 {
-	margin-left: 0;
+	padding-left: 0;
 
 	.wp-block-latest-comments__comment {
 		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 {
-	margin-left: 0;
+	padding-left: 0;
 
 	& > li {
 		/* Vertical margins logic */

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

@@ -4,4 +4,11 @@
 		margin: #{map-deep-get($config-global, "spacing", "vertical")} 0;
 		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 {
 	border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
-	margin-left: 0;
+	padding-left: 0;
 	list-style: none;
 
 	> li {
@@ -58,7 +58,7 @@
 
 .children {
 	list-style: none;
-	margin-left: #{map-deep-get($config-global, "spacing", "horizontal")};
+	padding-left: #{map-deep-get($config-global, "spacing", "horizontal")};
 
 	> li {
 		border-top: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
@@ -67,7 +67,7 @@
 	}
 
 	@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;
 		margin: 0;
 		max-width: none;
+		padding-left: 0;
 		position: relative;
 
+		ul {
+			padding-left: 0;
+		}
+
 		li {
 			display: block;
 			position: relative;

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

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

+ 15 - 0
varia/style-editor.css

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

+ 11 - 5
varia/style-rtl.css

@@ -1449,7 +1449,7 @@ img {
 }
 
 .wp-block-latest-comments {
-	margin-right: 0;
+	padding-right: 0;
 }
 
 .wp-block-latest-comments .wp-block-latest-comments__comment {
@@ -1484,7 +1484,7 @@ img {
 }
 
 .wp-block-latest-posts {
-	margin-right: 0;
+	padding-right: 0;
 }
 
 .wp-block-latest-posts > li {
@@ -2375,10 +2375,15 @@ table th,
 	list-style: none;
 	margin: 0;
 	max-width: none;
+	padding-right: 0;
 	position: relative;
 	/* Sub-menus Flyout */
 }
 
+.main-navigation > div > ul ul {
+	padding-right: 0;
+}
+
 .main-navigation > div > ul li {
 	display: block;
 	position: relative;
@@ -2534,6 +2539,7 @@ table th,
 	display: flex;
 	list-style: none;
 	margin: 0;
+	padding-right: 0;
 }
 
 .social-navigation > div > ul > li:first-of-type > a {
@@ -2885,7 +2891,7 @@ table th,
  */
 .comment-list {
 	border-bottom: 1px solid #DDDDDD;
-	margin-right: 0;
+	padding-right: 0;
 	list-style: none;
 }
 
@@ -2897,7 +2903,7 @@ table th,
 
 .children {
 	list-style: none;
-	margin-right: 16px;
+	padding-right: 16px;
 }
 
 .children > li {
@@ -2908,7 +2914,7 @@ table th,
 
 @media only screen and (min-width: 560px) {
 	.children {
-		margin-right: calc(2 * 16px);
+		padding-right: 32px;
 	}
 }
 

+ 11 - 5
varia/style.css

@@ -1449,7 +1449,7 @@ img {
 }
 
 .wp-block-latest-comments {
-	margin-left: 0;
+	padding-left: 0;
 }
 
 .wp-block-latest-comments .wp-block-latest-comments__comment {
@@ -1484,7 +1484,7 @@ img {
 }
 
 .wp-block-latest-posts {
-	margin-left: 0;
+	padding-left: 0;
 }
 
 .wp-block-latest-posts > li {
@@ -2392,10 +2392,15 @@ table th,
 	list-style: none;
 	margin: 0;
 	max-width: none;
+	padding-left: 0;
 	position: relative;
 	/* Sub-menus Flyout */
 }
 
+.main-navigation > div > ul ul {
+	padding-left: 0;
+}
+
 .main-navigation > div > ul li {
 	display: block;
 	position: relative;
@@ -2551,6 +2556,7 @@ table th,
 	display: flex;
 	list-style: none;
 	margin: 0;
+	padding-left: 0;
 }
 
 .social-navigation > div > ul > li:first-of-type > a {
@@ -2902,7 +2908,7 @@ table th,
  */
 .comment-list {
 	border-bottom: 1px solid #DDDDDD;
-	margin-left: 0;
+	padding-left: 0;
 	list-style: none;
 }
 
@@ -2914,7 +2920,7 @@ table th,
 
 .children {
 	list-style: none;
-	margin-left: 16px;
+	padding-left: 16px;
 }
 
 .children > li {
@@ -2925,7 +2931,7 @@ table th,
 
 @media only screen and (min-width: 560px) {
 	.children {
-		margin-left: calc(2 * 16px);
+		padding-left: 32px;
 	}
 }