0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00
penpot/frontend/resources/styles/main/partials/sidebar.scss

572 lines
11 KiB
SCSS
Raw Normal View History

2016-03-01 20:39:13 +02:00
// 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
2016-03-01 20:39:13 +02:00
2015-06-18 19:35:50 +02:00
.settings-bar {
2020-03-03 13:14:37 +01:00
background-color: $color-gray-50;
2020-05-19 14:37:53 +02:00
border-left: 1px solid $color-gray-60;
2022-01-26 15:16:21 +01:00
position: relative;
2016-02-12 16:26:11 +01:00
&.settings-bar-left {
2020-05-19 14:37:53 +02:00
border-left: none;
border-right: 1px solid $color-gray-60;
& .tab-container-tabs {
padding-left: 1.5rem;
}
2016-02-12 16:26:11 +01:00
}
2015-06-18 19:35:50 +02:00
.settings-bar-inside {
display: grid;
grid-template-columns: 100%;
grid-template-rows: 100%;
height: calc(100% - 2px);
2015-06-18 19:35:50 +02:00
.tool-window,
.sitemap {
position: relative;
2020-03-03 13:14:37 +01:00
border-bottom: 1px solid $color-gray-60;
2015-06-18 19:35:50 +02:00
display: flex;
flex-direction: column;
2016-02-18 16:54:43 +01:00
flex: 1;
2015-06-18 19:35:50 +02:00
width: 100%;
height: 100%;
2015-06-18 19:35:50 +02:00
.tool-window-bar {
align-items: center;
display: flex;
flex-shrink: 0;
2021-10-05 10:16:44 +02:00
padding: $size-2;
overflow: hidden;
margin: 0;
2015-06-18 19:35:50 +02:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-20;
2015-06-18 19:35:50 +02:00
height: 12px;
width: 12px;
}
button,
div {
border: none;
background-color: transparent;
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2021-10-05 12:59:00 +02:00
font-size: $fs14;
2022-03-10 12:59:17 +01:00
max-width: 100%;
2022-07-15 10:57:53 +02:00
overflow: hidden;
2022-03-10 12:59:17 +01:00
text-overflow: ellipsis;
white-space: nowrap;
2015-06-18 19:35:50 +02:00
}
span.pages-title {
color: #e3e3e3;
font-size: 0.875rem;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
2020-08-04 12:05:54 +02:00
span.tool-badge {
border: 1px solid $color-primary;
border-radius: $br2;
2020-08-04 12:05:54 +02:00
font-size: $fs10;
color: $color-primary;
padding: 2px 4px;
margin-left: auto;
}
2020-08-05 13:30:26 +02:00
span.tool-link {
margin-left: auto;
svg {
fill: $color-gray-30;
height: 16px;
width: 16px;
}
&:hover {
svg {
fill: $color-primary;
}
}
}
span.library-title {
color: $color-gray-10;
font-size: $fs14;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-window-bar-icon {
2022-04-05 10:35:26 +02:00
height: 21px;
display: flex;
align-items: center;
justify-content: center;
svg {
width: 15px;
height: 15px;
}
}
&.big {
height: 3rem;
padding-bottom: 1rem;
}
.tool-window-bar-title {
font-size: $fs14;
margin-left: 0.5rem;
}
2015-06-18 19:35:50 +02:00
.tool-window-icon {
2021-10-05 10:16:44 +02:00
margin-right: $size-2;
2019-12-16 14:19:25 +01:00
display: none;
2015-06-18 19:35:50 +02:00
}
.tool-window-close {
cursor: pointer;
margin-left: auto;
transform: rotate(45deg);
&:hover {
svg {
2016-02-17 08:56:02 +01:00
fill: $color-danger;
2015-06-18 19:35:50 +02:00
}
}
}
& .view-only-mode {
color: $color-primary;
border: 1px solid $color-primary;
border-radius: $br3;
font-size: $fs10;
text-transform: uppercase;
display: flex;
align-items: center;
justify-content: center;
margin-left: auto;
padding: 0.25rem;
}
2015-06-18 19:35:50 +02:00
}
}
2015-06-18 19:35:50 +02:00
.assets-bar .tool-window {
flex: none;
height: auto;
2020-03-24 14:38:13 +01:00
}
}
2022-01-26 15:16:21 +01:00
.empty {
color: $color-gray-20;
font-size: $fs12;
line-height: $lh-150;
text-align: center;
padding: 0 15px;
display: flex;
flex-direction: column;
gap: 20px;
margin-top: 12px;
.tool-window-bar-icon {
height: 32px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 16px;
}
svg {
width: 32px;
height: 32px;
fill: $color-gray-30;
}
.btn-primary {
margin-top: 10px;
background-color: $color-gray-60;
color: $color-gray-10;
&:hover {
background-color: $color-primary;
color: $color-black;
}
}
}
& > .resize-area {
2022-01-26 15:16:21 +01:00
position: absolute;
width: 8px;
height: 100%;
z-index: 10;
cursor: ew-resize;
}
&.settings-bar-left > .resize-area {
2022-01-26 15:16:21 +01:00
right: -8px;
}
&.settings-bar-right > .resize-area {
2022-01-31 17:50:33 +01:00
left: -4px;
2022-01-26 15:16:21 +01:00
}
2020-03-24 14:38:13 +01:00
}
2020-04-27 14:31:57 +02:00
2020-03-24 14:38:13 +01:00
.tool-window-content {
display: flex;
2020-04-27 14:31:57 +02:00
flex-direction: column;
2020-03-24 14:38:13 +01:00
height: 100%;
2020-04-27 14:31:57 +02:00
width: 100%;
overflow-y: auto;
overflow-x: hidden;
2022-11-29 14:03:08 +01:00
&.inspect {
.tab-container-tabs {
padding-bottom: 0.5rem;
background-color: $color-gray-50;
border-bottom: 1px solid $color-gray-60;
height: 3rem;
}
.tab-container-tab-title {
border-radius: $br4;
2022-11-29 14:03:08 +01:00
&.current {
background-color: $color-primary;
color: black;
}
}
}
2020-03-24 14:38:13 +01:00
}
.element-list {
margin: 0;
width: 100%;
ul {
border-left: 9px solid $color-gray-50;
2020-10-15 10:59:23 +02:00
margin: 0 0 0 0.4rem;
2020-03-24 14:38:13 +01:00
li {
border-left: 1px solid $color-gray-40;
}
}
li {
cursor: pointer;
display: flex;
flex-direction: column;
width: 100%;
padding-top: 1px;
padding-bottom: 1px;
2020-03-24 14:38:13 +01:00
&.open {
ul {
li {
.element-list-body {
border-style: dashed;
}
}
2016-01-24 18:52:09 +01:00
}
2015-06-18 19:35:50 +02:00
}
}
}
.element-list.pages-list {
max-height: 10rem;
2021-01-19 07:55:29 +01:00
.context-menu {
position: fixed;
}
.context-menu-items {
border: none;
margin: none;
}
.context-menu-action {
width: 100%;
}
}
2022-01-31 17:50:33 +01:00
button.collapse-sidebar {
background: none;
border: none;
cursor: pointer;
height: 2.5rem;
padding-top: 0.75rem;
position: absolute;
width: 1rem;
& svg {
width: 12px;
height: 12px;
fill: $color-gray-20;
transform: rotate(180deg);
}
&.collapsed {
2022-02-02 18:08:47 +01:00
background: $color-gray-60;
2022-01-31 17:50:33 +01:00
left: 48px;
top: 48px;
2022-02-02 18:08:47 +01:00
width: 28px;
height: 48px;
2022-01-31 17:50:33 +01:00
padding: 0;
border-radius: 0 $br4 $br4 0;
2022-02-02 18:08:47 +01:00
border-left: 1px solid $color-gray-50;
2022-01-31 17:50:33 +01:00
& svg {
transform: rotate(0deg);
}
}
}
#layers.tool-window {
2022-02-02 18:08:47 +01:00
overflow: auto;
}
.layers-tab {
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: 100%;
height: 100%;
overflow: hidden;
}
2022-05-03 10:34:11 +02:00
.shortcuts,
.debug-panel {
.shortcuts-header,
.debug-panel-header {
2022-05-03 10:34:11 +02:00
display: flex;
height: 40px;
background-color: $color-gray-60;
.shortcuts-title,
.debug-panel-title {
2022-05-03 10:34:11 +02:00
color: $color-white;
font-size: $fs12;
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
2022-05-11 10:55:16 +02:00
svg {
height: 18px;
width: 18px;
transform: rotate(45deg);
fill: $color-gray-20;
}
2022-05-03 10:34:11 +02:00
}
.shortcuts-close-button,
.debug-panel-close-button {
2022-05-03 10:34:11 +02:00
display: flex;
justify-content: center;
background-color: transparent;
border: none;
cursor: pointer;
padding: 2px 0 2px 15px;
position: absolute;
top: 8px;
svg {
height: 18px;
width: 18px;
transform: rotate(45deg);
fill: $color-gray-20;
}
}
}
.search-field {
height: 60px;
display: flex;
justify-content: center;
align-items: center;
padding: 12px 10px;
2023-01-05 16:35:12 +01:00
2022-05-03 10:34:11 +02:00
.search-box {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid $color-gray-30;
border-radius: $br2;
2022-05-03 10:34:11 +02:00
width: 100%;
2023-01-05 16:35:12 +01:00
&:focus-within {
border: 1px solid $color-primary;
}
2022-05-03 10:34:11 +02:00
.input-text {
margin: 0;
background: $color-gray-50;
width: 100%;
color: $color-white;
&:focus {
border-bottom: none;
}
}
.icon-wrapper {
display: flex;
justify-content: center;
align-items: center;
border: none;
background-color: transparent;
padding: 0;
.icon {
display: flex;
justify-content: center;
align-items: center;
&.close {
transform: rotate(45deg);
}
2022-05-03 10:34:11 +02:00
}
}
svg {
width: 16px;
height: 16px;
margin: 0 7px;
cursor: pointer;
fill: $color-gray-20;
}
}
}
.shortcut-list {
border-top: 1px solid $color-gray-60;
padding: 10px;
overflow-y: auto;
height: 90%;
margin-bottom: 15px;
.section-title {
background-color: $color-gray-60;
padding: 4px 0;
}
.section-title,
.subsection-title {
display: flex;
cursor: pointer;
margin-top: 4px;
font-size: $fs12;
2022-05-11 10:55:16 +02:00
2022-05-03 10:34:11 +02:00
.section-name {
color: $color-white;
}
.collapesed-shortcuts {
padding: 0 10px;
svg {
height: 8px;
width: 8px;
fill: $color-gray-20;
}
&.open {
svg {
transform: rotate(90deg);
}
}
}
.shortcut-count {
padding-left: 5px;
color: $color-white;
}
}
.subsection-title {
padding: 4px 0px;
.subsection-name {
color: $color-white;
}
}
2022-05-11 10:55:16 +02:00
.section-title,
.subsection-title {
&:hover {
background-color: $color-primary;
.subsection-name,
.section-name {
color: $color-gray-60;
}
svg {
fill: $color-gray-60;
}
}
}
2022-05-03 10:34:11 +02:00
.shortcut-name {
border: 1px solid $color-gray-60;
border-radius: $br4;
2022-05-03 10:34:11 +02:00
padding: 7px;
display: flex;
justify-content: space-between;
margin-top: 4px;
color: $color-white;
font-size: $fs12;
2022-09-30 13:09:53 +02:00
.command-name {
display: flex;
align-items: center;
}
2022-05-03 10:34:11 +02:00
.keys {
flex-grow: 1;
display: flex;
2022-09-30 13:09:53 +02:00
align-items: center;
2022-05-03 10:34:11 +02:00
justify-content: flex-end;
}
.char-box {
min-width: 15px;
background-color: $color-white;
color: $color-black;
border-radius: $br3;
2022-05-03 10:34:11 +02:00
padding: 2px 5px;
font-size: $fs11;
font-weight: $fw600;
2022-05-03 10:34:11 +02:00
margin: 0 2px;
text-transform: capitalize;
display: inline-block;
text-align: center;
}
.space {
margin: 0 3px;
}
}
}
2022-05-11 10:55:16 +02:00
.not-found {
background-color: $color-gray-60;
padding: 4px 0;
color: $color-white;
display: flex;
justify-content: center;
margin-top: 4px;
font-size: $fs12;
}
2022-05-03 10:34:11 +02:00
}
.debug-panel {
.debug-panel-inner {
padding: 8px;
}
.debug-option {
display: flex;
gap: 8px;
margin: 4px 0;
cursor: pointer;
label {
font-size: 80%;
cursor: pointer;
}
svg {
width: 15px;
height: 15px;
background: white;
}
&:hover {
svg {
stroke: var(--color-primary);
}
label {
color: var(--color-primary);
}
}
}
}