Skip to content

Commit

Permalink
Quadrat: Add table styles (#3719)
Browse files Browse the repository at this point in the history
* Quadrat: Add styles for tables

* Add tbody for extra specificity

* Add a border to the top of the first row

* Remove text-align.

Co-authored-by: Jeff Ong <jonger4@gmail.com>
  • Loading branch information
2 people authored and pbking committed May 6, 2021
1 parent c16e07d commit 6207327
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
22 changes: 20 additions & 2 deletions quadrat/assets/theme.css

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

19 changes: 19 additions & 0 deletions quadrat/sass/blocks/_table.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.wp-block-table {
th {
font-weight: 500;
}

tbody td { // tbody adds the specificity needed to override the default Gutenberg styles
border-bottom-width: 0;
border-top-width: 0;
vertical-align: top;
}

tr:first-child td {
border-top-width: 1px;
}

tr:last-child td {
border-bottom-width: 1px;
}
}
3 changes: 2 additions & 1 deletion quadrat/sass/theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "../../blank-canvas-blocks/sass/base/breakpoints"; // Get the mobile-only media query and make it available to this theme's styles
@import "blocks/cover";
@import "blocks/media-text";
@import "blocks/list";
@import "blocks/media-text";
@import "blocks/table";
@import "header";
@import "utility";

0 comments on commit 6207327

Please sign in to comment.