0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00
penpot/frontend/resources/styles/main/partials/comments.scss

469 lines
7.6 KiB
SCSS
Raw Normal View History

2020-11-21 00:14:59 +01:00
.comments-section {
.thread-bubble {
position: absolute;
display: flex;
transform: translate(-15px, -15px);
cursor: pointer;
pointer-events: auto;
background-color: $color-gray-10;
color: $color-gray-60;
border: 1px solid #B1B2B5;
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba($color-black, 0.25);
font-size: $fs13;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
&.resolved {
color: $color-gray-10;
background-color: $color-gray-50;
}
&.unread {
background-color: $color-primary;
}
}
.thread-content {
position: absolute;
pointer-events: auto;
margin-left: 10px;
background: $color-white;
border: 1px solid $color-gray-20;
box-sizing: border-box;
box-shadow: 0px 2px 8px rgba($color-black, 0.25);
border-radius: 2px;
2020-11-24 16:10:30 +01:00
min-width: 280px;
max-width: 280px;
2021-03-26 10:37:19 +01:00
user-select: text;
.comments {
2020-11-24 16:10:30 +01:00
max-height: 420px;
min-height: 105px;
2020-10-22 13:11:15 +02:00
overflow-y: auto;
}
hr {
border: 0;
height: 1px;
2020-11-24 16:10:30 +01:00
background-color: $color-gray-20;
margin: 0px 10px;
}
}
.reply-form {
display: flex;
padding: 10px;
flex-direction: column;
&.edit-form {
padding-bottom: 0px;
}
textarea {
font-family: "worksans", sans-serif;
font-size: $fs13;
min-height: 32px;
outline: none;
overflow: hidden;
2021-10-05 10:16:44 +02:00
padding: $size-2;
resize: none;
width: 100%;
2020-11-21 00:14:59 +01:00
border-radius: 2px;
border: 1px solid $color-gray-10;
2021-01-13 15:04:22 +01:00
max-height: 4rem;
}
.buttons {
margin-top: 10px;
display: flex;
justify-content: flex-end;
input {
margin: 0px;
2020-11-24 16:10:30 +01:00
font-size: $fs14;
&:not(:last-child) {
margin-right: 6px;
}
}
}
}
.comment-container {
position: relative;
}
.comment {
display: flex;
flex-direction: column;
2021-10-05 10:16:44 +02:00
padding: $size-4 $size-2;
.author {
display: flex;
align-items: center;
height: 26px;
max-height: 26px;
position: relative;
.name {
display: flex;
flex-direction: column;
.fullname {
font-weight: 700;
color: $color-gray-60;
2020-11-24 16:10:30 +01:00
font-size: $fs13;
@include text-ellipsis;
2020-11-24 16:10:30 +01:00
width: 174px;
}
.timeago {
margin-top: -2px;
2020-11-24 16:10:30 +01:00
font-size: $fs12;
color: $color-gray-30;
}
}
.avatar {
display: flex;
align-items: center;
padding-right: 6px;
img {
border-radius: 50%;
flex-shrink: 0;
2020-11-24 16:10:30 +01:00
height: 24px;
width: 24px;
}
}
.options-resolve {
position: absolute;
right: 20px;
top: 0px;
width: 16px;
height: 16px;
cursor: pointer;
svg {
width: 16px;
height: 16px;
fill: $color-gray-30;
}
}
.options {
position: absolute;
2020-11-24 16:10:30 +01:00
right: -2px;
top: 2px;
height: 16px;
display: flex;
align-items: center;
cursor: pointer;
.options-icon {
svg {
2020-11-24 16:10:30 +01:00
width: 14px;
height: 14px;
fill: $color-black;
}
}
}
}
.content {
2021-10-05 10:16:44 +02:00
margin: $size-4 0;
2020-11-24 16:10:30 +01:00
font-size: $fs14;
color: $color-black;
.text {
2021-10-05 10:16:44 +02:00
margin: 0 $size-2 0 26px;
white-space: pre-wrap;
display: inline-block;
}
}
}
.comment-options-dropdown {
2020-10-22 13:11:15 +02:00
top: 7px;
right: 7px;
width: 150px;
border: 1px solid #B1B2B5;
}
}
2020-11-21 00:14:59 +01:00
.workspace-comment-threads-sidebar-header {
display: flex;
background-color: $color-black;
height: 34px;
align-items: center;
padding: 0px 9px;
color: $color-gray-10;
font-size: $fs12;
justify-content: space-between;
.options {
display: flex;
2020-11-21 00:14:59 +01:00
margin-right: 3px;
cursor: pointer;
2020-11-21 00:14:59 +01:00
.label {
padding-right: 8px;
}
2020-11-21 00:14:59 +01:00
.icon {
display: flex;
align-items: center;
}
2020-11-21 00:14:59 +01:00
svg {
fill: $color-gray-10;
width: 10px;
height: 10px;
}
}
2020-11-21 00:14:59 +01:00
.dropdown {
top: 80px;
right: 7px;
}
2020-11-21 00:14:59 +01:00
}
2020-11-21 00:14:59 +01:00
.comment-threads-section {
pointer-events: auto;
.thread-groups {
hr {
border: 0;
height: 1px;
2020-11-24 16:10:30 +01:00
background-color: $color-gray-30;
margin: 0px 0px;
}
}
2020-11-21 00:14:59 +01:00
.thread-group {
display: flex;
flex-direction: column;
font-size: $fs12;
.section-title {
margin: 0px 10px;
margin-top: 15px;
.icon {
margin-right: 4px;
}
.label {
2020-11-21 00:14:59 +01:00
&.filename {
font-weight: 700;
}
}
svg {
fill: $color-gray-10;
height: 10px;
width: 10px;
}
}
}
.thread-bubble {
position: unset;
transform: unset;
2020-11-24 16:10:30 +01:00
width: 24px;
height: 24px;
margin-right: 6px;
box-shadow: unset;
}
.comment {
2020-11-21 00:14:59 +01:00
cursor: pointer;
.author {
2021-10-05 10:16:44 +02:00
margin-bottom: $size-4;
.name {
display: flex;
.fullname {
width: unset;
2020-11-24 16:10:30 +01:00
max-width: 170px;
color: $color-gray-20;
padding-right: 3px;
}
.timeago {
margin-top: unset;
color: $color-gray-20;
}
}
}
.content {
margin-top: 0px;
color: $color-white;
&.replies {
2021-10-05 10:16:44 +02:00
margin: 0 $size-2 0 26px;
display: flex;
.total-replies {
margin-right: 9px;
color: $color-info;
}
.new-replies {
color: $color-primary;
}
}
}
}
}
2020-11-21 00:14:59 +01:00
.viewer-comments-container {
width: 100%;
height: 100%;
z-index: 1000;
position: absolute;
top: 0px;
left: 0px;
}
.workspace-comments-container {
width: 100%;
height: 100%;
grid-column: 1/span 2;
grid-row: 1/span 2;
z-index: 1000;
pointer-events: none;
overflow: hidden;
user-select: text;
2020-11-21 00:14:59 +01:00
.threads {
position: absolute;
top: 0px;
left: 0px;
}
}
.dashboard-comments-section {
width: 25px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
background-color: $color-dashboard;
border-radius: 3px;
position: relative;
.button {
width: 25px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
background-color: $color-dashboard;
border-radius: 3px;
svg {
width: 15px;
height: 15px;
}
&.unread {
background-color: $color-warning;
}
&.open {
background-color: $color-black;
svg { fill: $color-primary; }
}
}
.dropdown {
2020-11-24 16:10:30 +01:00
width: 280px;
2020-11-21 00:14:59 +01:00
bottom: 35px;
left: 0px;
border-radius: 3px;
}
.header {
display: flex;
height: 40px;
align-items: center;
padding: 0px 11px;
h3 {
font-weight: 400;
color: $color-black;
2020-11-24 16:10:30 +01:00
font-size: $fs14;
2020-11-21 00:14:59 +01:00
line-height: $fs18;
flex-grow: 1;
}
.close {
display: flex;
align-items: center;
}
svg {
width: 15px;
height: 15px;
transform: rotate(45deg);
}
}
.thread-groups {
max-height: calc(30rem - 40px);
overflow: auto;
2021-01-13 15:04:22 +01:00
hr {
background-color: $color-gray-10;
2021-01-13 15:04:22 +01:00
}
2020-11-21 00:14:59 +01:00
}
.thread-group .section-title {
color: $color-black;
}
2020-11-21 00:14:59 +01:00
.comment {
.author .name .fullname {
color: $color-gray-40;
}
.content {
color: $color-black;
}
}
}
.thread-groups-placeholder {
align-items: center;
display: flex;
flex-direction: column;
font-size: $fs12;
2021-10-05 10:16:44 +02:00
padding: $size-5;
text-align: center;
svg {
fill: $color-gray-20;
height: 24px;
2021-10-05 10:16:44 +02:00
margin-bottom: $size-5;
width: 24px;
}
}