webapp/src/components/Article/Comment.module.scss

216 lines
3.2 KiB
SCSS

.comment {
background-color: #fff;
margin: 0 -2.4rem 0.5em;
padding: 0.8rem 2.4rem;
transition: background-color 0.3s;
position: relative;
&:last-child {
margin-bottom: 0;
}
.comment {
&:before,
&:after {
content: '';
left: 0;
position: absolute;
}
&:before {
border-bottom: 2px solid #ccc;
border-left: 2px solid #ccc;
border-radius: 0 0 0 1.2rem;
top: -1rem;
height: 2.4rem;
width: 1.2rem;
}
&:after {
background: #ccc;
height: 100%;
top: 0;
width: 2px;
}
&:last-child:after {
display: none;
}
}
.shout-body {
@include font-size(1.5rem);
margin-bottom: 1em;
*:last-child {
margin-bottom: 0;
}
}
.author {
align-items: center;
margin-bottom: 1.4rem;
}
}
.commentContent {
&:hover {
.commentControlReply,
.commentControlShare,
.commentControlDelete,
.commentControlEdit,
.commentControlComplain {
opacity: 1;
}
}
}
.commentControls {
@include font-size(1.2rem);
margin-bottom: 0.5em;
}
.commentControlReply,
.commentControlShare,
.commentControlDelete,
.commentControlEdit,
.commentControlComplain {
@include media-breakpoint-up(md) {
opacity: 0;
transition: opacity 0.3s;
}
}
.commentControlReply,
.commentControlShare,
.commentControlDelete,
.commentControlEdit {
.icon {
line-height: 1.2;
width: 1.2rem;
}
}
.commentControl {
border: none;
color: #696969;
cursor: pointer;
display: inline-flex;
line-height: 1.2;
margin-right: 0.8rem;
padding: 0.2em 0.3em;
transition: opacity 0.2s, color 0.3s, background-color 0.3s;
vertical-align: top;
&:hover {
background: #000;
color: #fff;
.icon {
filter: invert(1);
opacity: 1;
}
}
.icon {
filter: invert(0);
margin-right: 0.3em;
opacity: 0.6;
transition: filter 0.3s, opacity 0.2s;
img {
margin-bottom: -0.1em;
}
}
}
.commentControlReply {
.icon {
height: 1.2em;
width: 1.2em;
}
}
.commentBody {
@include font-size(1.5rem);
line-height: 1.47;
}
.commentAuthor,
.commentDate,
.commentRating {
@include font-size(1.2rem);
}
.commentDate {
color: rgb(0 0 0 / 30%);
flex: 1;
@include media-breakpoint-down(md) {
margin-left: 1rem;
}
}
.commentDetails {
display: flex;
margin-bottom: 1.2rem;
}
.commentRating {
align-items: center;
display: flex;
font-weight: bold;
}
.commentRatingValue {
padding: 0 0.3em;
}
.commentRatingPositive {
color: #2bb452;
}
.commentRatingNegative {
color: #d00820;
}
.commentRatingControl {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
height: 0;
width: 0;
}
.commentRatingControlUp {
border-bottom: 8px solid rgb(0 0 0 / 40%);
}
.commentRatingControlDown {
border-top: 8px solid rgb(0 0 0 / 40%);
}
.replyForm {
background: #fff;
border: 2px solid rgb(38 56 217 / 50%);
border-radius: 0.8rem;
margin-left: 2.4rem;
position: relative;
textarea {
border: none;
border-radius: 0.8rem;
padding-top: 1.2rem;
}
}
.replyFormControls {
padding: 0.5rem 1.6rem 1.6rem;
text-align: right;
button {
@include font-size(1.6rem);
margin-left: 1.2rem;
}
}