Skip to content

Commit

Permalink
fix: small change in the styling of tables
Browse files Browse the repository at this point in the history
  • Loading branch information
vycke committed Sep 11, 2024
1 parent 07723bd commit 1bb0a16
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
11 changes: 9 additions & 2 deletions feo.css
Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,15 @@
table {
--table-radius: 6px;
--table-color: var(--surface-1);
border: 1px solid var(--table-color);
background: var(--table-color);
border-collapse: collapse;
border-radius: calc(var(--table-radius) * 1.3);
width: 100%;
}

thead {
background: var(--table-color);
}

table tr:last-child td:first-child {
border-bottom-left-radius: var(--table-radius);
}
Expand All @@ -691,6 +694,10 @@
padding: 4px var(--token-size-000);
}

tbody tr {
border-top: 1px solid var(--table-color);
}

table tr:hover td {
background-color: var(--table-color);
}
Expand Down
2 changes: 1 addition & 1 deletion feo.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:11ty": "npx @11ty/eleventy && yarn css:docs"
},
"name": "feo-css",
"version": "5.2.0",
"version": "5.2.1",
"main": "feo.css",
"description": "A tiny CSS framework",
"repository": "https://github.com/vyckes/feo-css.git",
Expand Down
2 changes: 1 addition & 1 deletion public/feo.min.css

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions src/blocks/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ table {

/* Table fills always the available space */
width: 100%;
border: 1px solid var(--table-color);
/* the entire table gets the background, and cells get the site BG */
background: var(--table-color);
border-collapse: collapse;
border-radius: calc(var(--table-radius) * 1.3);
}

thead {
background: var(--table-color);
}

table tr:last-child td:first-child {
border-bottom-left-radius: var(--table-radius);
}
Expand All @@ -50,6 +52,10 @@ th {
padding: 4px var(--token-size-000);
}

tbody tr {
border-top: 1px solid var(--table-color);
}

table tr:hover td {
background-color: var(--table-color);
}

0 comments on commit 1bb0a16

Please sign in to comment.