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

232 lines
4.3 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) 2015-2020 Andrey Antukh <niwi@niwi.nz>
// Copyright (c) 2015-2020 Juan de la Cruz <delacruzgarciajuan@gmail.com>
2016-03-01 20:39:13 +02:00
2020-10-19 14:22:28 +02:00
$width-settings-bar: 16rem;
// This width is also used in update-viewport-size at frontend/src/app/main/data/workspace.cljs
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;
2015-06-18 19:35:50 +02:00
bottom: 0;
height: 100%;
position: fixed;
right: 0;
width: $width-settings-bar;
2020-10-30 14:02:35 +01:00
&.expanded {
width: $width-settings-bar * 3;
}
2016-02-12 16:26:11 +01:00
z-index: 10;
overflow-y: auto;
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;
2020-10-19 14:22:28 +02:00
left: 48px;
2016-02-12 16:26:11 +01:00
}
2015-06-18 19:35:50 +02:00
.settings-bar-inside {
2020-07-23 17:11:36 +02:00
align-items: flex-start;
display: grid;
grid-template-columns: 100%;
2020-03-27 15:43:09 +01:00
&[data-layout*='sitemap-pages'] {
grid-template-rows: auto;
}
&[data-layout*='layers'] {
2020-03-27 15:43:09 +01:00
grid-template-rows: auto 1fr;
}
&[data-layout*='libraries'] {
2020-03-27 15:43:09 +01:00
grid-template-rows: auto 1fr;
}
&[data-layout*='layers'][data-layout*='sitemap-pages'] {
2020-04-28 22:13:18 +02:00
grid-template-rows: 11.5rem 1fr;
2020-03-27 15:43:09 +01:00
}
&[data-layout*='libraries'][data-layout*='sitemap-pages'] {
2020-04-28 22:13:18 +02:00
grid-template-rows: 11.5rem 1fr;
}
&[data-layout*='layers'][data-layout*='libraries'] {
2020-03-27 15:43:09 +01:00
grid-template-rows: auto 30% 1fr;
}
2020-03-27 15:43:09 +01:00
&[data-layout*='layers'][data-layout*='libraries'][data-layout*='sitemap-pages'] {
2020-04-28 22:13:18 +02:00
grid-template-rows: 11.5rem 25% 1fr;
2020-03-27 15:43:09 +01:00
}
2015-06-18 19:35:50 +02:00
flex-direction: column;
2020-10-19 14:22:28 +02:00
padding-top: 48px;
2015-06-18 19:35:50 +02:00
height: 100%;
.tool-window {
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%;
2020-04-09 16:02:03 +02:00
overflow: hidden;
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;
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;
}
span {
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2020-04-25 18:26:17 +02:00
font-size: $fs13;
2015-06-18 19:35:50 +02:00
}
2020-08-04 12:05:54 +02:00
span.tool-badge {
border: 1px solid $color-primary;
border-radius: 2px;
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;
}
}
}
.tool-window-bar-icon {
height: 15px;
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
}
}
}
}
}
2015-06-18 19:35:50 +02:00
.assets-bar .tool-window {
flex: none;
height: auto;
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-12-10 11:26:11 +01:00
overflow-y: auto;
2020-03-24 14:38:13 +01:00
height: 100%;
2020-04-27 14:31:57 +02:00
width: 100%;
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%;
}
}