Skip to content

Commit

Permalink
Use variables from theme.json for table styles
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Mar 22, 2021
1 parent 31ef7c7 commit 4f1ffc2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions blank-canvas-blocks/assets/ponyfill.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions blank-canvas-blocks/experimental-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@
"hoverBackground": "var(--wp--custom--color--background)"
}
}
},
"table": {
"typography": {
"fontSize": "var(--wp--preset--font-size--tiny)"
}
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions blank-canvas-blocks/sass/blocks/_table.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.wp-block-table {
figcaption {
font-size: var(--wp--custom--table--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 change: 1 addition & 0 deletions blank-canvas-blocks/sass/ponyfill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
@import "blocks/file";
@import "blocks/separator";
@import "blocks/video";
@import "blocks/table";

0 comments on commit 4f1ffc2

Please sign in to comment.