duckquill/_sass/comments.scss

251 lines
5.1 KiB
SCSS
Raw Normal View History

2023-08-31 00:38:44 +00:00
/* Comments */
section#comments {
.comment {
display: grid;
column-gap: 1rem;
grid-template-areas:
"avatar name"
"avatar time"
"avatar post"
"...... card"
"...... interactions";
grid-template-columns: min-content;
justify-items: start;
margin: 2rem auto 2rem -1rem;
padding: 1rem;
.avatar-link {
grid-area: avatar;
height: 4rem;
position: relative;
width: 4rem;
.avatar {
margin: unset;
background-color: var(--bg2);
border-radius: var(--border-radius);
box-shadow: var(--shadow);
height: 100%;
width: 100%;
}
&.op::after {
background-color: var(--accent-color);
border-radius: 50%;
bottom: -0.25rem;
2023-08-31 03:51:01 +00:00
color: var(--light2);
2023-08-31 00:38:44 +00:00
content: "";
display: block;
font-size: 1.25rem;
font-weight: bold;
height: 1.5rem;
line-height: 1.5rem;
position: absolute;
right: -0.25rem;
text-align: center;
width: 1.5rem;
}
}
.author {
align-items: center;
cursor: default;
display: flex;
font-weight: bold;
gap: 0.5rem;
grid-area: name;
.instance {
background-color: var(--fg05);
border-radius: 9999px;
color: var(--text);
font-size: smaller;
font-weight: normal;
padding: 0.25rem 0.75rem;
&:hover {
opacity: 0.8;
text-decoration: none;
}
&.op {
background-color: var(--accent-color);
2023-08-31 03:51:01 +00:00
color: var(--light2);
2023-08-31 00:38:44 +00:00
&::before {
content: "";
font-weight: bold;
margin-inline-end: 0.25rem;
margin-inline-start: -0.25rem;
}
}
}
}
time {
@extend small;
font-size: smaller;
opacity: 0.9;
grid-area: time;
line-height: 1.5rem;
&.edited::after {
content: " *";
}
}
main {
grid-area: post;
justify-self: stretch;
p:first-child {
margin-top: 0.25rem;
}
p:last-child {
margin-bottom: 0;
}
}
.card {
color: inherit;
grid-area: card;
max-width: 400px;
&:hover {
text-decoration: none;
}
figure {
border-radius: var(--border-radius);
background-color: var(--bg2);
box-shadow: var(--shadow);
margin-left: 0;
margin-right: 0;
overflow: hidden;
transition: var(--transition);
img {
margin: unset;
}
&:hover {
transform: translateY(-0.5rem);
}
}
figcaption {
2023-09-11 13:22:59 +00:00
color: var(--text);
font-size: unset;
2023-08-31 00:38:44 +00:00
display: grid;
gap: 0.5rem;
margin: 0;
padding: 1rem;
text-align: left;
* {
display: inline-block;
line-height: 1.25;
margin: 0;
overflow: hidden;
padding: 0;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
// Hide the card from the shared post
&:first-of-type .card {
display: none;
}
footer {
@extend small;
display: flex;
gap: 0.4rem;
grid-area: interactions;
margin-top: 0.925rem;
.boosts {
cursor: default;
font-weight: 600;
font-variation-settings: "wght" 600; /* needed for webkit */
font-size: 90%;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: var(--orange-bg);
color: var(--orange-fg);
&::before {
color: var(--orange2);
content: "🔁";
margin-inline-end: 0.25rem;
}
}
.faves {
cursor: default;
font-weight: 600;
font-variation-settings: "wght" 600; /* needed for webkit */
font-size: 90%;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: var(--red-bg);
color: var(--red-fg);
&::before {
color: var(--red2);
content: "❤️";
margin-inline-end: 0.25rem;
}
}
}
.emoji {
margin: unset;
display: inline;
height: 1.25rem;
vertical-align: middle;
width: 1.25rem;
}
.invisible {
display: none;
}
.ellipsis::after {
content: "";
}
details {
summary {
background-image: linear-gradient(
90deg,
transparent,
transparent 0.4rem,
var(--bg2) 0.4rem,
var(--bg2) calc(100% - 0.4rem),
transparent calc(100% - 0.4rem),
transparent
),
repeating-linear-gradient(
45deg,
var(--bg1),
var(--bg1) 0.3rem,
var(--accent-color) 0.3rem,
var(--accent-color) 0.6rem
);
border-radius: var(--border-radius-small);
color: inherit;
cursor: pointer;
box-shadow: var(--shadow);
margin-top: 0.925rem;
padding: 1rem;
}
}
}
}