Skip to content

Commit

Permalink
Rename table to columns-table to avoid conflicting table block's css. (
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchoi-dev authored Aug 4, 2023
1 parent 41c59f2 commit c3131df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/blocks/columns/columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@
}

/* Table */
.columns.table {
.columns.columns-table {
font-size: 14px;
}

.columns.table > .row {
.columns.columns-table > .row {
margin-bottom: 0;
padding: var(--spacing-xs) 0;
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
border-bottom: 1px solid #D5D5D5;
align-items: center;
}

.columns.table > .row:hover {
.columns.columns-table > .row:hover {
background-color: #0000000f;
}

.columns.table > .row:first-child {
.columns.columns-table > .row:first-child {
text-transform: uppercase;
font-size: 11px;
font-weight: bold;
Expand All @@ -60,7 +60,7 @@

/* For desktop only */
@media (min-width:600px) {
.columns.table > .row {
.columns.columns-table > .row {
padding: var(--spacing-xs);
}
}
4 changes: 4 additions & 0 deletions libs/blocks/columns/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ export default function init(el) {
col.className = `col col-${cdx + 1}`;
});
});
if (el.classList.contains('table')) {
el.classList.add('columns-table');
el.classList.remove('table');
}
}

0 comments on commit c3131df

Please sign in to comment.