diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss
index c089d3b3d..25c769a2a 100644
--- a/app/assets/stylesheets/layout.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -2045,10 +2045,6 @@ table {
padding: $line-height / 4;
position: relative;
- .relative {
- padding-left: rem-calc(18);
- }
-
.divider {
color: $text-light;
display: inline-block;
@@ -2060,23 +2056,22 @@ table {
}
.responses-count {
- .far {
- @extend .fa-minus-square;
- font-size: $small-font-size;
- left: 0;
- position: absolute;
- text-decoration: none;
- top: 2px;
- }
-
.show-children {
+ @include has-fa-icon(plus-square, r);
display: none;
}
+ .collapse-children {
+ @include has-fa-icon(minus-square, r);
+ }
+
+ .show-children::before,
+ .collapse-children::before {
+ margin-right: rem-calc(6);
+ transform: translateY(1px);
+ }
+
&.collapsed {
- .far {
- @extend .fa-plus-square;
- }
.collapse-children {
display: none;
diff --git a/app/assets/stylesheets/mixins.scss b/app/assets/stylesheets/mixins.scss
index b5fb4b9f3..289eb83a6 100644
--- a/app/assets/stylesheets/mixins.scss
+++ b/app/assets/stylesheets/mixins.scss
@@ -148,3 +148,18 @@
transition: none;
}
}
+
+@mixin has-fa-icon($icon, $style) {
+ @extend .fa-#{$icon};
+
+ &::before {
+ @extend %fa-icon;
+ font-family: "Font Awesome 5 Free";
+
+ @if $style == "r" {
+ font-weight: normal;
+ } @else {
+ font-weight: bold;
+ }
+ }
+}
diff --git a/app/views/comments/_responses_count.html.erb b/app/views/comments/_responses_count.html.erb
index 3915b5495..d9ac9fdf0 100644
--- a/app/views/comments/_responses_count.html.erb
+++ b/app/views/comments/_responses_count.html.erb
@@ -1,6 +1,5 @@
<% if count > 0 %>
- <%= link_to "", class: "js-toggle-children relative" do %>
-
+ <%= link_to "", class: "js-toggle-children" do %>
<%= t("comments.comment.responses_show", count: count) %>
<%= t("comments.comment.responses_collapse", count: count) %>
<% end %>