♻️ Remove new-css-system from viewer

This commit is contained in:
Eva 2024-01-04 13:05:06 +01:00 committed by Andrey Antukh
parent 1433ec5dad
commit 480251c41c
40 changed files with 1299 additions and 3272 deletions

View file

@ -408,6 +408,8 @@
border-radius: $br-4;
box-shadow: inset 0 0 0px 2px rgb(255 255 255 / 20%);
svg {
width: $s-16;
height: $s-16;
display: none;
stroke: var(--input-checkbox-inactive-foreground-color);
}

View file

@ -53,9 +53,6 @@
// Partials
//#################################################
@import "main/partials/viewer";
@import "main/partials/viewer-header";
@import "main/partials/viewer-thumbnails";
@import "main/partials/activity-bar";
@import "main/partials/debug-icons-preview";
@import "main/partials/editable-label";
@ -67,6 +64,5 @@
@import "main/partials/user-settings";
@import "main/partials/workspace";
@import "main/partials/color-bullet";
@import "main/partials/inspect";
@import "main/partials/exception-page";
@import "main/partials/signup-questions";

View file

@ -1,487 +0,0 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC
.inspect-svg-wrapper {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.expand-button,
.copy-button {
visibility: hidden;
opacity: 0;
transition: opacity 0.3s;
position: absolute;
background: none;
border: none;
padding: 0;
cursor: pointer;
.code-block & {
visibility: visible;
opacity: 1;
}
svg {
width: 16px;
height: 16px;
fill: $color-gray-20;
transition: fill 0.3s;
&:hover {
fill: $color-primary;
}
}
}
.expand-button {
right: 24px;
top: -1px;
svg {
transform: rotate(45deg);
}
}
.copy-button {
right: 0;
top: 0;
}
.attributes-block {
user-select: text;
border-bottom: 1px solid $color-gray-60;
padding-bottom: 0.5rem;
font-size: $fs12;
.attributes-text-block {
border-bottom: 1px solid $color-gray-60;
}
& :last-child {
border-bottom: none;
}
.attributes-label {
color: $color-gray-20;
}
.attributes-value {
color: $color-white;
}
.attributes-block-title {
position: relative;
color: $color-gray-10;
padding: 0.5rem;
font-size: $fs14;
.copy-button {
padding: 0.5rem;
margin-top: 0.25rem;
}
}
.attributes-unit-row {
position: relative;
display: flex;
flex-direction: row;
padding: 0.6rem 1.6rem 0.6rem 0.5rem;
.attributes-label,
.attributes-value {
margin-right: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 50%;
.items {
margin-right: 5px;
}
}
.copy-button {
padding: 0.6rem 0.5rem;
margin-top: 0.25rem;
}
}
.attributes-color-row {
display: flex;
flex-direction: column;
padding: 1rem 0;
position: relative;
.attributes-color-id {
display: flex;
align-items: center;
& > * {
margin: 0 0.5rem;
}
margin-bottom: 0.5rem;
}
.attributes-color-value {
display: flex;
align-items: center;
& > * {
margin: 0 0.5rem;
}
& :last-child {
margin-right: 0;
}
}
.color-text {
width: 3rem;
text-transform: uppercase;
text-overflow: ellipsis;
overflow: hidden;
}
.attributes-color-display {
display: flex;
}
.color-bullet {
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid $color-gray-30;
}
.hide-color .color-bullet {
visibility: hidden;
}
.copy-button {
padding: 1rem 0.5rem;
margin-top: 0.25rem;
}
select {
font-size: $fs12;
margin: 0;
background: none;
color: $color-gray-20;
border: none;
border-bottom: 1px solid $color-gray-30;
padding: 0 1rem 0.25rem 0.25rem;
margin-top: 2px;
background-image: url("/images/icons/arrow-down-white.svg");
background-repeat: no-repeat;
background-position: 95% 48%;
background-size: 10px;
cursor: pointer;
outline: none;
&:focus,
&:focus-within {
border: 1px solid $color-primary;
}
option {
padding: 1rem;
background-color: $color-gray-50;
border: none;
}
}
}
.attributes-content-row {
position: relative;
margin: 0.5rem;
width: calc(100% - 1rem);
.attributes-content {
overflow-y: auto;
max-height: 5rem;
background: $color-gray-60;
border-radius: $br4;
padding: 1rem 0.5rem;
color: $color-gray-10;
white-space: pre-wrap;
}
.copy-button {
padding: 0.5rem;
margin-top: 0.25rem;
}
}
.attributes-image-row {
position: relative;
display: flex;
padding: 0.25rem;
align-items: center;
justify-content: center;
margin: 0.5rem;
background: $color-gray-60;
border-radius: $br4;
width: calc(100% - 1rem);
min-height: 5rem;
img {
max-height: 8rem;
max-width: 100%;
width: auto;
}
}
.attributes-shadow-row {
position: relative;
display: flex;
margin: 0.5rem;
padding-right: 2rem;
justify-content: space-between;
& > :first-child {
color: $color-gray-10;
}
.attributes-shadow {
display: flex;
margin-left: 4px;
}
}
.attributes-stroke-row {
position: relative;
display: flex;
margin: 0.5rem;
padding-right: 2rem;
justify-content: space-between;
}
.attributes-typography-name-row {
position: relative;
margin-top: 0.5rem;
border: 1px solid $color-black;
border-radius: $br4;
margin: 0.5rem;
display: flex;
flex-direction: row;
align-items: center;
.copy-button {
padding: 0.5rem;
margin-top: 0.25rem;
}
}
.attributes-typography-row {
position: relative;
margin: 0.5rem;
padding-right: 2rem;
.typography-sample {
font-size: $fs16;
}
}
.download-button {
display: block;
text-align: center;
border: 1px solid $color-gray-60;
background-color: $color-gray-60;
padding: 0.5rem 1rem;
color: $color-gray-10;
width: calc(100% - 1rem);
border-radius: $br4;
margin: 0.5rem;
cursor: pointer;
text-decoration: none;
&:hover {
background-color: $color-primary;
color: $color-black;
}
}
.attributes-block-title,
.attributes-unit-row,
.attributes-color-row,
.attributes-shadow-row,
.attributes-stroke-row,
.attributes-typography-row,
.attributes-content-row,
.attributes-typography-name-row {
&:hover {
.expand-button,
.copy-button {
visibility: visible;
opacity: 1;
}
}
}
.attributes-shadow-block,
.attributes-stroke-block,
.attributes-fill-block {
border-top: 1px solid $color-gray-60;
}
.attributes-shadow-blocks :first-child,
.attributes-stroke-blocks :first-child,
.attributes-fill-blocks :first-child {
border-top: none;
}
}
.code-block {
position: relative;
margin-top: 0.5rem;
border-top: 1px solid $color-gray-60;
&:last-child {
margin-bottom: 18px;
}
&:hover {
.code-row-lang {
.expand-button,
.copy-button {
visibility: visible;
opacity: 1;
}
}
}
.code-row-lang {
color: $color-gray-10;
position: relative;
display: flex;
flex-direction: row;
font-size: $fs14;
margin: 0.5rem;
.expand-button,
.copy-button {
margin-top: 8px;
}
.custom-select {
border: 1px solid $color-gray-40;
border-radius: 3px;
cursor: pointer;
padding: 0.25rem 1.5rem 0.25rem 0.25rem;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
.dropdown-button {
position: absolute;
right: 0.25rem;
top: 7px;
svg {
fill: $color-gray-40;
height: 10px;
width: 10px;
}
}
}
.custom-select-dropdown {
background-color: $color-white;
border-radius: 3px;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
left: 0;
max-height: 30rem;
min-width: 7rem;
position: absolute;
overflow-y: auto;
top: 30px;
z-index: 12;
li {
color: $color-gray-60;
cursor: pointer;
font-size: 0.875rem;
display: flex;
gap: 0 10px;
justify-content: flex-start;
padding: 0.5rem;
.checked-element {
padding-left: 0;
}
}
svg {
visibility: hidden;
width: 8px;
height: 8px;
background: none;
margin: 0.25rem;
fill: $color-black;
}
.is-selected svg {
visibility: visible;
}
}
}
.code-row-display {
line-height: 1;
margin: 0.5rem;
font-size: $fs14;
max-height: var(--code-height, 400px);
overflow: auto;
.code-display {
font-family: monospace;
border-radius: $br4;
padding: 0.5rem 1rem;
overflow: hidden;
white-space: pre;
min-width: fit-content;
background: $color-gray-60;
user-select: text;
.hljs-attr {
color: #a6e22e;
}
.hljs-comment {
color: $color-gray-30;
}
.hljs-string {
color: #66d9ef;
}
}
}
.resize-area {
width: 100%;
position: absolute;
bottom: -15px;
left: 0;
height: 18px;
z-index: 1;
cursor: ns-resize;
}
}
.element-options > :first-child {
border-top: none;
}
.inspect-annotation {
.content {
background-color: $color-gray-60;
color: $color-white;
margin: 0 10px;
padding: 10px;
font-size: $fs14;
overflow-wrap: anywhere;
white-space: pre-wrap;
}
}

View file

@ -1,234 +0,0 @@
.viewer-header {
align-items: center;
background-color: $color-gray-50;
border-bottom: 1px solid $color-gray-60;
display: grid;
grid-template-columns: 1fr 130px 1fr;
height: 48px;
padding: 0 $size-4 0 55px;
top: 0;
position: absolute;
justify-content: space-between;
width: 100vw;
a {
font-size: $fs12;
}
.nav-zone {
justify-content: flex-start;
width: 100%;
}
.main-icon {
align-items: center;
background-color: $color-gray-60;
cursor: pointer;
display: flex;
height: 100%;
justify-content: center;
position: absolute;
left: 0;
top: 0;
width: 48px;
a {
height: 30px;
svg {
fill: $color-gray-30;
height: 30px;
width: 28px;
}
&:hover {
svg {
fill: $color-primary;
}
}
}
}
.options-zone {
align-items: center;
display: flex;
justify-content: flex-end;
position: relative;
z-index: 10;
> * {
margin-left: $size-5;
@media only screen and (max-width: 1366px) {
margin-left: 0.5rem;
}
}
.btn-primary {
flex-shrink: 0;
svg {
display: none;
}
@media only screen and (max-width: 1366px) {
padding: 0 0.5rem;
svg {
display: inline-block;
}
span {
display: none;
}
}
&:hover {
svg {
fill: $color-gray-20;
}
}
}
.view-options {
align-items: center;
cursor: pointer;
display: flex;
position: relative;
> span {
color: $color-gray-10;
font-size: $fs14;
margin-right: $size-1;
}
> .icon {
align-items: center;
cursor: pointer;
display: flex;
justify-content: center;
svg {
fill: $color-gray-10;
height: 12px;
width: 12px;
}
&:hover {
> svg {
fill: $color-primary;
}
}
}
.dropdown {
min-width: 295px;
top: 45px;
left: -25px;
}
}
}
.sitemap-zone {
align-items: center;
cursor: pointer;
display: flex;
padding: $size-1;
position: relative;
width: 100%;
.icon {
display: flex;
justify-content: center;
align-items: center;
svg {
fill: $color-gray-20;
height: 12px;
margin-right: $size-2;
width: 12px;
}
}
.breadcrumb {
display: grid;
grid-template-columns: auto 10px auto 10px auto;
}
.breadcrumb,
.current-frame {
position: relative;
> span {
color: $color-gray-20;
margin-right: $size-1;
font-size: $fs14;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
> .dropdown {
top: 45px;
right: 10px;
}
}
.current-frame {
display: grid;
grid-template-columns: 14px 1fr;
span {
color: $color-white;
margin-right: $size-1;
}
.counters {
color: $color-gray-20;
}
}
}
.mode-zone {
display: flex;
height: 100%;
.mode-zone-button {
background: inherit;
border: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 48px;
svg {
fill: $color-gray-20;
width: 20px;
height: 20px;
}
&.active {
background: $color-gray-60;
svg {
fill: $color-primary;
}
}
}
}
.users-zone {
align-items: center;
cursor: pointer;
display: flex;
margin: 0;
li {
margin-left: $size-2;
position: relative;
img {
border: 3px solid #f3dd14;
border-radius: 50%;
flex-shrink: 0;
height: 25px;
width: 25px;
}
}
}
}

View file

@ -1,192 +0,0 @@
.viewer-thumbnails {
grid-row: 1 / span 1;
grid-column: 1 / span 1;
background-color: $color-gray-50;
overflow: hidden;
display: flex;
flex-direction: column;
z-index: 11;
&.invisible {
visibility: hidden;
pointer-events: none;
}
&.expanded {
grid-row: 1 / span 2;
.btn-expand svg {
transform: rotate(180deg);
}
}
.thumbnails-summary {
padding: 0.5rem 1rem;
display: flex;
justify-content: space-between;
.buttons {
display: flex;
justify-content: space-between;
width: 50px;
span {
cursor: pointer;
}
svg {
fill: $color-gray-30;
height: 20px;
width: 20px;
&:hover {
fill: $color-white;
}
}
.btn-close {
transform: rotate(45deg);
}
}
.counter {
color: $color-gray-10;
}
}
.thumbnails-content {
display: grid;
grid-template-columns: 40px auto 40px;
grid-template-rows: auto;
}
.left-scroll-handler {
grid-column: 1 / span 1;
grid-row: 1 / span 1;
background-color: $color-gray-50;
opacity: 0;
display: flex;
z-index: 12;
cursor: pointer;
flex-direction: column;
justify-content: center;
align-items: center;
&:hover {
opacity: 0.5;
}
svg {
transform: rotate(180deg);
width: 30px;
height: 30px;
}
}
.right-scroll-handler {
grid-column: 3 / span 1;
grid-row: 1 / span 1;
background-color: $color-gray-50;
opacity: 0;
display: flex;
z-index: 12;
cursor: pointer;
flex-direction: column;
justify-content: center;
align-items: center;
&:hover {
opacity: 0.5;
}
svg {
width: 30px;
height: 30px;
}
}
.thumbnails-list {
grid-column: 1 / span 3;
grid-row: 1 / span 1;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
.thumbnails-list-inside {
display: flex;
position: relative;
}
}
.thumbnails-list-expanded {
grid-column: 1 / span 3;
grid-row: 1 / span 1;
display: flex;
flex-wrap: wrap;
overflow: hidden;
}
.thumbnail-item {
display: flex;
flex-direction: column;
padding: 1rem;
cursor: pointer;
}
.thumbnail-preview {
background-color: $color-gray-40;
width: 120px;
min-height: 120px;
height: 120px;
border: 1px solid $color-gray-20;
border-radius: $br2;
padding: 4px;
display: flex;
justify-content: center;
align-items: center;
svg {
width: 100%;
height: 100%;
}
&.selected {
border-color: $color-primary;
}
&:hover {
border-color: $color-primary;
outline: 2px solid $color-primary;
}
}
.thumbnail-info {
padding: 0.5rem 0;
width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
span {
font-size: $fs12;
}
}
}
.thumbnail-close {
grid-row: 1 / span 2;
grid-column: 1 / span 1;
z-index: 11;
&.invisible {
display: none;
}
}

View file

@ -1,214 +0,0 @@
.viewer-content {
background-color: black;
display: grid;
grid-template-rows: 232px auto;
grid-template-columns: 1fr;
}
.fullscreen.viewer-layout {
.viewer-section {
& .viewer-go-prev,
& .viewer-go-next {
.arrow {
display: none;
}
}
}
}
.fullscreen.viewer-layout.force-visible {
.viewer-section {
& .viewer-go-prev,
& .viewer-go-next {
.arrow {
display: flex;
}
}
}
}
.viewer-loader {
svg#loader-pencil {
fill: $color-gray-50;
}
}
.viewer-section {
height: calc(100vh - 48px);
grid-row: 1 / span 2;
grid-column: 1 / span 1;
display: flex;
align-items: center;
flex-flow: wrap;
overflow: auto;
&.fullscreen {
height: 100vh;
margin-top: 0px;
}
& .viewer-go-prev,
& .viewer-go-next {
position: absolute;
height: 100%;
display: flex;
align-items: center;
width: 53px;
z-index: 2;
.arrow {
display: flex;
align-items: center;
justify-content: center;
border-radius: $br12;
background: $color-gray-50;
width: 24px;
height: 24px;
cursor: pointer;
fill: $color-gray-30;
svg {
width: 12px;
height: 12px;
}
&:hover {
background: $color-primary;
fill: $color-black;
}
}
}
& .viewer-go-next {
right: 8px;
width: 46px;
svg {
margin-left: 2px;
}
}
& .viewer-go-next.right-bar {
right: 0;
}
& .viewer-go-prev {
left: 0;
padding-left: 29px;
svg {
margin-right: 2px;
}
}
& .viewer-go-prev.left-bar {
left: 0;
}
& .viewer-bottom {
position: absolute;
bottom: 8px;
height: 30px;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 2;
&.left-bar {
width: 100%;
}
.reset {
display: flex;
align-items: center;
border-radius: $br12;
background: $color-gray-50;
width: 24px;
height: 24px;
cursor: pointer;
fill: $color-gray-30;
margin-left: 29px;
svg {
margin-left: 4px;
width: 15px;
height: 15px;
}
&:hover {
background: $color-primary;
fill: $color-black;
}
}
.counter {
display: flex;
align-items: center;
justify-content: center;
border-radius: $br12;
background: $color-gray-50;
width: 67px;
height: 25px;
fill: $color-gray-20;
}
}
& .viewer-wrapper {
margin-left: auto;
margin-right: auto;
position: relative;
}
& .viewer-clipper {
display: grid;
grid-template-rows: 1fr;
grid-template-columns: 1fr;
justify-items: center;
align-items: center;
overflow: hidden;
svg {
transform-origin: center;
}
}
& .viewer-wrapper-out {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
& .comments-right-sidebar {
position: absolute;
right: 0;
top: 50px;
width: 256px;
height: calc(100vh - 48px);
z-index: 9;
}
.empty-state {
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
}
}
.viewport-container {
clip-path: inset(0 0 0 0);
grid-column: 1 / 1;
grid-row: 1 / 1;
.not-fixed {
position: absolute;
}
.fixed {
position: fixed;
pointer-events: none;
.frame-children g {
pointer-events: auto;
}
}
}