Skip to content

Commit 0cf10b7

Browse files
authored
Merge pull request #3630 from IntersectMBO/fix/3615-bug-markdown-tables-in-governance-actions-are-cropped-on-smaller-screens
fix(#3615): wrap the markdown table styles around markdown class
2 parents b1b55d0 + 9ce8eef commit 0cf10b7

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export const GovernanceActionCardElement = ({
147147

148148
return (
149149
<Markdown
150+
className="markdown"
150151
components={markdownComponents}
151152
remarkPlugins={[remarkMath, remarkGfm]}
152153
rehypePlugins={[rehypeKatex]}
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
table {
2-
display: block;
3-
overflow-x: auto;
4-
margin: 32px 0;
5-
border-spacing: 0;
6-
border-collapse: collapse;
7-
max-width: 100%;
8-
}
1+
.markdown {
2+
& table {
3+
display: block;
4+
overflow-x: auto;
5+
margin: 32px 0;
6+
border-spacing: 0;
7+
border-collapse: collapse;
8+
max-width: 100%;
99

10-
table thead {
11-
background-color: #d6e2ff80;
12-
}
10+
& thead {
11+
background-color: #d6e2ff80;
12+
}
1313

14-
table th,
15-
table td {
16-
padding: 6px 13px;
17-
border: 1px solid #d6e2ff;
18-
}
14+
& th,
15+
& td {
16+
padding: 6px 13px;
17+
border: 1px solid #d6e2ff;
18+
}
1919

20-
table td > :last-child {
21-
margin-bottom: 0;
22-
}
20+
& td > :last-child {
21+
margin-bottom: 0;
22+
}
2323

24-
table tr:nth-child(2n) {
25-
background-color: #d6e2ff80;
24+
& tr:nth-child(2n) {
25+
background-color: #d6e2ff80;
26+
}
27+
}
2628
}

0 commit comments

Comments
 (0)