Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move table styles to article only #30776

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 37 additions & 30 deletions docs/_sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,8 @@ html {
}

table {
margin-bottom: 20px;
border-spacing: 0;
border-collapse: collapse;
border-radius: 8px;

// Box shadow is used here because border-radius and border-collapse don't work together. It leads to double borders.
// https://stackoverflow.com/questions/628301/the-border-radius-property-and-border-collapsecollapse-dont-mix-how-can-i-use
border-style: hidden;
box-shadow: 0 0 0 1px $color-green-borders;
}

th:first-child {
border-top-left-radius: 8px;
}

th:last-child {
border-top-right-radius: 8px;
}

tr:last-child > td:first-child {
border-bottom-left-radius: 8px;
}

tr:last-child > td:last-child {
border-bottom-right-radius: 8px;
}

caption,
Expand All @@ -68,13 +45,6 @@ td {
text-align: left;
font-weight: 400;
vertical-align: middle;
padding: 6px 13px;
border: 1px solid $color-green-borders;
}

thead tr th {
font-weight: bold;
background-color: $color-green-highlightBG;
}

q,
Expand Down Expand Up @@ -395,6 +365,43 @@ button {
}
}

table {
margin-bottom: 20px;
border-radius: 8px;

// Box shadow is used here because border-radius and border-collapse don't work together. It leads to double borders.
// https://stackoverflow.com/questions/628301/the-border-radius-property-and-border-collapsecollapse-dont-mix-how-can-i-use
border-style: hidden;
box-shadow: 0 0 0 1px $color-green-borders;
}

th:first-child {
border-top-left-radius: 8px;
}

th:last-child {
border-top-right-radius: 8px;
}

tr:last-child > td:first-child {
border-bottom-left-radius: 8px;
}

tr:last-child > td:last-child {
border-bottom-right-radius: 8px;
}

th,
td {
padding: 6px 13px;
border: 1px solid $color-green-borders;
}

thead tr th {
font-weight: bold;
background-color: $color-green-highlightBG;
}

.img-wrap {
display: flex;
justify-content: space-around;
Expand Down
Loading