Skip to content

Instantly share code, notes, and snippets.

@simongcc
Created September 19, 2020 08:00
Show Gist options
  • Save simongcc/d7904e0a97525df10b73ea547d1b70e4 to your computer and use it in GitHub Desktop.
Save simongcc/d7904e0a97525df10b73ea547d1b70e4 to your computer and use it in GitHub Desktop.
CSS Table example
.table {
// display: table;
width: 100%;
background: red;
.tbl-col-group {
display: table-column-group;
.tbl-col {
display: table-column;
&:nth-child(1) {
width: 20%;
}
&:nth-child(2) {
width: 15%;
}
&:nth-child(3) {
width: 15%;
}
&:nth-child(5) {
width: 14%;
}
}
}
.tbl-header {
display: table-header-group;
.tbl-row {
display: table-row;
.tbl-cell {
display: table-cell;
font-weight: 700;
}
}
}
.tbl-body {
display: table-row-group;
.tbl-row {
display: table-row;
.tbl-cell {
display: table-cell;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment