0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-26 16:39:49 -05:00
penpot/frontend/resources/styles/main/partials/sidebar.scss

191 lines
3.7 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
$width-settings-bar: 15rem;
// 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;
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;
left: 40px;
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;
2019-12-17 15:37:30 +01:00
padding-top: 40px;
2015-06-18 19:35:50 +02:00
height: 100%;
.tool-window {
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;
2019-12-16 14:19:25 +01:00
padding: $small;
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;
}
}
}
2015-06-18 19:35:50 +02:00
.tool-window-icon {
margin-right: $small;
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-03-24 14:38:13 +01:00
overflow-y: auto;
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;
margin: 0;
li {
border-left: 1px solid $color-gray-40;
}
}
li {
cursor: pointer;
display: flex;
flex-direction: column;
width: 100%;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
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
}
}
}