0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/frontend/resources/styles/main/partials/inspect.scss

486 lines
8.8 KiB
SCSS
Raw Normal View History

// 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/.
//
2022-09-20 23:23:22 +02:00
// Copyright (c) KALEIDOS INC
.inspect-svg-wrapper {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
2020-10-22 18:08:40 +02:00
2020-10-30 14:02:35 +01:00
.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;
}
}
}
2020-10-30 14:02:35 +01:00
.expand-button {
right: 24px;
top: -1px;
svg {
transform: rotate(45deg);
}
}
.copy-button {
right: 0;
top: 0;
}
2020-10-22 18:08:40 +02:00
.attributes-block {
user-select: text;
border-bottom: 1px solid $color-gray-60;
padding-bottom: 0.5rem;
font-size: $fs12;
2020-10-23 15:41:06 +02:00
.attributes-text-block {
border-bottom: 1px solid $color-gray-60;
}
& :last-child {
2020-10-23 15:41:06 +02:00
border-bottom: none;
}
2020-10-22 18:08:40 +02:00
.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;
2020-10-30 14:02:35 +01:00
.copy-button {
2020-10-22 18:08:40 +02:00
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;
2020-10-22 18:08:40 +02:00
.attributes-label,
.attributes-value {
2021-03-05 15:03:29 +01:00
margin-right: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
2020-10-22 18:08:40 +02:00
width: 50%;
.items {
margin-right: 5px;
}
2020-10-22 18:08:40 +02:00
}
2020-10-30 14:02:35 +01:00
.copy-button {
padding: 0.6rem 0.5rem;
2020-10-22 18:08:40 +02:00
margin-top: 0.25rem;
}
}
.attributes-color-row {
display: flex;
flex-direction: column;
2020-10-22 18:08:40 +02:00
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;
}
}
2020-10-22 18:08:40 +02:00
.color-text {
width: 3rem;
text-transform: uppercase;
}
2020-10-22 18:08:40 +02:00
.attributes-color-display {
display: flex;
}
.color-bullet {
width: 24px;
height: 24px;
border-radius: 50%;
2023-01-05 16:35:12 +01:00
border: 1px solid $color-gray-30;
2020-10-22 18:08:40 +02:00
}
.hide-color .color-bullet {
visibility: hidden;
}
2020-10-30 14:02:35 +01:00
.copy-button {
2020-10-22 18:08:40 +02:00
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;
}
2020-10-22 18:08:40 +02:00
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;
2020-10-23 15:41:06 +02:00
max-height: 5rem;
2020-10-22 18:08:40 +02:00
background: $color-gray-60;
border-radius: $br4;
2020-10-22 18:08:40 +02:00
padding: 1rem 0.5rem;
color: $color-gray-10;
white-space: pre-wrap;
}
2020-10-23 15:41:06 +02:00
2020-10-30 14:02:35 +01:00
.copy-button {
2020-10-23 15:41:06 +02:00
padding: 0.5rem;
margin-top: 0.25rem;
}
2020-10-22 18:08:40 +02:00
}
.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;
2020-10-22 18:08:40 +02:00
width: calc(100% - 1rem);
min-height: 5rem;
2020-10-22 18:08:40 +02:00
img {
max-height: 8rem;
max-width: 100%;
2020-10-22 18:08:40 +02:00
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;
2020-10-22 18:08:40 +02:00
}
}
.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;
}
}
2020-10-23 15:41:06 +02:00
.attributes-typography-row {
position: relative;
margin: 0.5rem;
padding-right: 2rem;
.typography-sample {
font-size: $fs16;
}
}
2020-10-22 18:08:40 +02:00
.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;
2020-10-22 18:08:40 +02:00
margin: 0.5rem;
cursor: pointer;
2023-07-11 08:52:36 +02:00
text-decoration: none;
2020-10-22 18:08:40 +02:00
&:hover {
background-color: $color-primary;
color: $color-black;
}
}
.attributes-block-title,
.attributes-unit-row,
.attributes-color-row,
.attributes-shadow-row,
2020-10-23 15:41:06 +02:00
.attributes-stroke-row,
.attributes-typography-row,
.attributes-content-row,
.attributes-typography-name-row {
2020-10-30 14:02:35 +01:00
&:hover {
.expand-button,
.copy-button {
visibility: visible;
opacity: 1;
}
2020-10-22 18:08:40 +02:00
}
}
.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;
}
2020-10-22 18:08:40 +02:00
}
.code-block {
2023-06-12 18:14:24 +02:00
position: relative;
margin-top: 0.5rem;
border-top: 1px solid $color-gray-60;
2023-06-14 12:24:40 +02:00
&:last-child {
margin-bottom: 18px;
}
2022-02-22 12:49:22 +01:00
&:hover {
.code-row-lang {
2020-10-30 14:02:35 +01:00
.expand-button,
.copy-button {
visibility: visible;
opacity: 1;
}
}
2022-02-22 12:49:22 +01:00
}
.code-row-lang {
2022-08-19 12:07:11 +02:00
color: $color-gray-10;
2022-02-22 12:49:22 +01:00
position: relative;
display: flex;
flex-direction: row;
2022-08-19 12:07:11 +02:00
font-size: $fs14;
2022-02-22 12:49:22 +01:00
margin: 0.5rem;
2020-10-30 14:02:35 +01:00
.expand-button,
.copy-button {
margin-top: 8px;
}
2023-06-12 18:14:24 +02:00
.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 {
2023-06-12 18:14:24 +02:00
line-height: 1;
margin: 0.5rem;
2020-10-30 14:02:35 +01:00
font-size: $fs14;
2023-06-12 18:14:24 +02:00
max-height: var(--code-height, 400px);
overflow: auto;
.code-display {
2023-06-12 18:14:24 +02:00
font-family: monospace;
border-radius: $br4;
2023-06-12 18:14:24 +02:00
padding: 0.5rem 1rem;
overflow: hidden;
2023-06-12 18:14:24 +02:00
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;
}
}
}
2023-06-12 18:14:24 +02:00
.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;
}
2023-04-27 13:26:32 +02:00
.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;
}
}