Skip to content

Commit

Permalink
fix(elements)!: table padding from px to em (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar authored Feb 12, 2023
1 parent bcda832 commit c00d283
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/core-styles.base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/elements/table--basic.css

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

2 changes: 1 addition & 1 deletion dist/elements/table.css

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

11 changes: 7 additions & 4 deletions src/lib/_imports/elements/table--basic.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@import url("../tools/x-truncate.css");

table {
--cell-pad-vert: 0.6667em; /* 8px if font-size is 12px */
--cell-pad-horz: 1.3333em; /* 16px if font-size is 12px */

/* To prevent borders from being hidden */
/* NOTE: Specifically, the right border of pinned columns (narrow windows) */
border-collapse: separate; /* overwrite Bootstrap */
Expand Down Expand Up @@ -35,8 +38,8 @@ tr:nth-child(even) :is(th, td) {

:is(td, th) {
vertical-align: top;
padding-block: 8px;
padding-inline: 16px;
padding-block: var(--cell-pad-vert);
padding-inline: var(--cell-pad-horz);

color: var(--global-color-primary--dark);
}
Expand Down Expand Up @@ -75,8 +78,8 @@ caption {
caption-side: top; /* override Bootstrap */

/* To mimic table cell */
padding-block: 8px;
padding-inline: 16px;
padding-block: var(--cell-pad-vert);
padding-inline: var(--cell-pad-horz);
}


Expand Down

0 comments on commit c00d283

Please sign in to comment.