Sfoglia il codice sorgente

Merge pull request #3503 from Automattic/add/table-styles

Blank Canvas Blocks: Add table styles
Jeff Ong 4 anni fa
parent
commit
811574dcf0

+ 10 - 0
blank-canvas-blocks/assets/ponyfill.css

@@ -502,4 +502,14 @@ p.has-drop-cap:not(:focus):first-letter {
 	text-align: var(--wp--custom--video--caption--text-align);
 }
 
+.wp-block-table figcaption {
+	font-size: var(--wp--custom--table--figcaption--typography--font-size);
+	text-align: center;
+}
+
+.wp-block-table td, .wp-block-table th {
+	border: 1px solid;
+	padding: calc(0.5*var(--wp--custom--margin--vertical)) calc(0.5*var(--wp--custom--margin--horizontal));
+}
+
 /*# sourceMappingURL=ponyfill.css.map */

+ 7 - 0
blank-canvas-blocks/experimental-theme.json

@@ -224,6 +224,13 @@
 							"hoverBackground": "var(--wp--custom--color--background)"
 						}
 					}
+				},
+				"table": {
+					"figcaption": {
+						"typography": {
+							"fontSize": "var(--wp--preset--font-size--tiny)"
+						}
+					}
 				}
 			}
 		}

+ 11 - 0
blank-canvas-blocks/sass/blocks/_table.scss

@@ -0,0 +1,11 @@
+.wp-block-table {
+	figcaption {
+		font-size: var(--wp--custom--table--figcaption--typography--font-size);
+		text-align: center;
+	}
+
+	td, th {
+		border: 1px solid;
+		padding: calc(0.5*var(--wp--custom--margin--vertical)) calc(0.5*var(--wp--custom--margin--horizontal));
+	}
+}

+ 1 - 0
blank-canvas-blocks/sass/ponyfill.scss

@@ -19,4 +19,5 @@
 @import "blocks/search";
 @import "blocks/file";
 @import "blocks/separator";
+@import "blocks/table";
 @import "blocks/video";