Skip to content

Commit c8c169e

Browse files
committed
css cleanups
1 parent 909872c commit c8c169e

5 files changed

+41
-33
lines changed

static/scss/main/community_post_list.scss

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ $post_spacing: 30px;
6565

6666
.post_author a {
6767
color: body_color_light();
68-
font-size: 18px;
6968

7069
@include slighly_narrow {
7170
font-size: inherit;

static/scss/main/submission_comment_list.scss

+26-20
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
.submission_comment_list {
2+
display: flex;
3+
flex-direction: column;
4+
gap: 20px;
5+
26
.submission_comment, .comment_spacer {
37
position: relative;
4-
margin: 0 0 40px 0;
5-
6-
&:last-child {
7-
margin-bottom: 30px;
8-
}
98
}
109

1110
.comment_spacer {
@@ -14,8 +13,6 @@
1413
margin-bottom: 0;
1514

1615
&.animated {
17-
margin-bottom: 40px;
18-
1916
.submission_comment {
2017
left: 0;
2118
@include opacity(2);
@@ -31,7 +28,8 @@
3128
}
3229

3330
.submission_comment {
34-
@include clearfix;
31+
display: flex;
32+
gap: 10px;
3533

3634
&.loading {
3735
position: relative;
@@ -57,39 +55,47 @@
5755
}
5856

5957
.comment_avatar {
60-
float: left;
61-
margin-left: 20px;
62-
margin-top: 5px;
58+
flex: none;
6359

60+
> a {
61+
display: block;
62+
}
6463
img {
65-
display: inline-block;
64+
display: block;
6665
width: 40px;
6766
height: 40px;
6867
border-radius: 20px;
6968
}
7069
}
7170

72-
.comment_tools {
73-
float: right;
71+
.comment_head {
72+
display: flex;
73+
gap: 10px;
74+
}
75+
76+
.comment_author {
77+
color: body_color_light();
78+
}
7479

80+
.comment_tools {
81+
margin-left: auto;
7582
a {
7683
color: body_color_lighter();
7784
}
7885
}
7986

8087
.comment_content {
81-
margin-left: 80px;
82-
margin-right: 20px;
88+
flex: 1;
89+
min-width: 0;
90+
display: flex;
91+
flex-direction: column;
92+
gap: 10px;
8393
}
8494

8595
.comment_time {
8696
color: body_color_lighter();
8797
}
8898

89-
.comment_head {
90-
margin-bottom: 20px;
91-
}
92-
9399
.comment_body.user_formatted {
94100
padding: 0;
95101
}

static/scss/main/submission_commenter.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131

3232
.submission_comment_list {
33-
padding-top: 30px;
33+
padding: 30px 20px;
3434
border-top: 1px solid border_color();
3535

3636
&:empty {

static/scss/main/submission_list.scss

+7-3
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,12 @@
455455

456456
.submission_footer {
457457
border-top: 1px solid border_color();
458-
position: relative;
459-
overflow: hidden;
458+
display: flex;
459+
gap: 5px;
460460

461461
.footer_inside {
462462
padding: 10px 20px;
463463
position: relative;
464-
float: left;
465464
}
466465

467466
a {
@@ -474,6 +473,7 @@
474473
.submission_tags {
475474
padding: 10px 20px;
476475
text-align: right;
476+
margin-left: auto;
477477

478478
.submission_tag {
479479
@include transition(all 0.2s ease);
@@ -483,6 +483,10 @@
483483
text-decoration: none;
484484
color: body_color_light();
485485

486+
&:first-child {
487+
margin-left: 0;
488+
}
489+
486490
&:hover {
487491
color: link_color();
488492
}

widgets/submission_comment_list.moon

+7-8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class SubmissionCommentList extends require "widgets.base"
2929

3030
div class: "comment_content", ->
3131
div class: "comment_head", ->
32+
if suspended
33+
em "Suspended account"
34+
else
35+
a class: "comment_author", href: user_url, comment.user\name_for_display!
36+
37+
span class: "comment_time", title: comment.created_at, time_ago_in_words comment.created_at
38+
3239
if @current_user
3340
can_edit = comment\allowed_to_edit @current_user
3441
can_delete = @current_user.id == @submission.user_id
@@ -49,14 +56,6 @@ class SubmissionCommentList extends require "widgets.base"
4956
raw " · "
5057
a href: "#", class: "delete_btn", "Delete"
5158

52-
if suspended
53-
em "Suspended account"
54-
else
55-
a href: user_url, comment.user\name_for_display!
56-
57-
raw " · "
58-
span class: "comment_time", title: comment.created_at, time_ago_in_words comment.created_at
59-
6059
div class: "comment_body user_formatted", ->
6160
if suspended
6261
p class: "suspended_message", ->

0 commit comments

Comments
 (0)