Skip to content

Commit

Permalink
Remove Fomantic comment module (#24703)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
silverwind authored May 14, 2023
1 parent bed6885 commit 11552a7
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 312 deletions.
1 change: 1 addition & 0 deletions web_src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import "./modules/modal.css";
@import "./modules/breadcrumb.css";
@import "./modules/card.css";
@import "./modules/comment.css";
@import "./code/linebutton.css";
@import "./markup/content.css";
@import "./markup/codecopy.css";
Expand Down
103 changes: 103 additions & 0 deletions web_src/css/modules/comment.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/* These are the remnants of the fomantic comment module */
/* TODO: remove all of these rules */

.ui.comments {
margin: 1.5em 0;
max-width: 650px;
}

.ui.comments:first-child {
margin-top: 0;
}

.ui.comments:last-child {
margin-bottom: 0;
}

.ui.comments .comment {
position: relative;
background: none;
margin: 0.5em 0 0;
padding: 0.5em 0 0;
border: none;
border-top: none;
line-height: 1.2;
}

.ui.comments .comment:first-child {
margin-top: 0;
padding-top: 0;
}

.ui.comments .comment > .comments {
margin: 0 0 0.5em 0.5em;
padding: 1em 0 1em 1em;
}

.ui.comments .comment > .comments::before {
position: absolute;
top: 0;
left: 0;
}

.ui.comments .comment > .comments .comment {
border: none;
border-top: none;
background: none;
}

.ui.comments .comment .avatar {
display: block;
width: 2.5em;
height: auto;
float: left;
margin: 0.2em 0 0;
}

.ui.comments .comment img.avatar,
.ui.comments .comment .avatar img {
display: block;
margin: 0 auto;
width: 100%;
height: 100%;
border-radius: 0.25rem;
}

.ui.comments .comment > .content {
display: block;
}

.ui.comments .comment > .avatar ~ .content {
margin-left: 3.5em;
}

.ui.comments .comment .author {
font-size: 1em;
font-weight: 500;
}

.ui.comments .comment a.author {
cursor: pointer;
}

.ui.comments .comment .metadata {
display: inline-block;
margin-left: 0.5em;
font-size: 0.875em;
}

.ui.comments .comment .metadata > * {
display: inline-block;
margin: 0 0.5em 0 0;
}

.ui.comments .comment .metadata > :last-child {
margin-right: 0;
}

.ui.comments .comment .text {
margin: 0.25em 0 0.5em;
font-size: 1em;
word-wrap: break-word;
line-height: 1.3;
}
Loading

0 comments on commit 11552a7

Please sign in to comment.