Skip to content

Commit 11552a7

Browse files
authored
Remove Fomantic comment module (#24703)
Remove the comment module and put the styles that we still need into a separate file, eliminating about 2/3 of the CSS in line count.
1 parent bed6885 commit 11552a7

File tree

4 files changed

+104
-312
lines changed

4 files changed

+104
-312
lines changed

web_src/css/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import "./modules/modal.css";
1212
@import "./modules/breadcrumb.css";
1313
@import "./modules/card.css";
14+
@import "./modules/comment.css";
1415
@import "./code/linebutton.css";
1516
@import "./markup/content.css";
1617
@import "./markup/codecopy.css";

web_src/css/modules/comment.css

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/* These are the remnants of the fomantic comment module */
2+
/* TODO: remove all of these rules */
3+
4+
.ui.comments {
5+
margin: 1.5em 0;
6+
max-width: 650px;
7+
}
8+
9+
.ui.comments:first-child {
10+
margin-top: 0;
11+
}
12+
13+
.ui.comments:last-child {
14+
margin-bottom: 0;
15+
}
16+
17+
.ui.comments .comment {
18+
position: relative;
19+
background: none;
20+
margin: 0.5em 0 0;
21+
padding: 0.5em 0 0;
22+
border: none;
23+
border-top: none;
24+
line-height: 1.2;
25+
}
26+
27+
.ui.comments .comment:first-child {
28+
margin-top: 0;
29+
padding-top: 0;
30+
}
31+
32+
.ui.comments .comment > .comments {
33+
margin: 0 0 0.5em 0.5em;
34+
padding: 1em 0 1em 1em;
35+
}
36+
37+
.ui.comments .comment > .comments::before {
38+
position: absolute;
39+
top: 0;
40+
left: 0;
41+
}
42+
43+
.ui.comments .comment > .comments .comment {
44+
border: none;
45+
border-top: none;
46+
background: none;
47+
}
48+
49+
.ui.comments .comment .avatar {
50+
display: block;
51+
width: 2.5em;
52+
height: auto;
53+
float: left;
54+
margin: 0.2em 0 0;
55+
}
56+
57+
.ui.comments .comment img.avatar,
58+
.ui.comments .comment .avatar img {
59+
display: block;
60+
margin: 0 auto;
61+
width: 100%;
62+
height: 100%;
63+
border-radius: 0.25rem;
64+
}
65+
66+
.ui.comments .comment > .content {
67+
display: block;
68+
}
69+
70+
.ui.comments .comment > .avatar ~ .content {
71+
margin-left: 3.5em;
72+
}
73+
74+
.ui.comments .comment .author {
75+
font-size: 1em;
76+
font-weight: 500;
77+
}
78+
79+
.ui.comments .comment a.author {
80+
cursor: pointer;
81+
}
82+
83+
.ui.comments .comment .metadata {
84+
display: inline-block;
85+
margin-left: 0.5em;
86+
font-size: 0.875em;
87+
}
88+
89+
.ui.comments .comment .metadata > * {
90+
display: inline-block;
91+
margin: 0 0.5em 0 0;
92+
}
93+
94+
.ui.comments .comment .metadata > :last-child {
95+
margin-right: 0;
96+
}
97+
98+
.ui.comments .comment .text {
99+
margin: 0.25em 0 0.5em;
100+
font-size: 1em;
101+
word-wrap: break-word;
102+
line-height: 1.3;
103+
}

0 commit comments

Comments
 (0)