0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 16:09:17 -05:00
penpot/frontend/resources/styles/main/partials/sidebar-element-options.scss

458 lines
7.1 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-2016 Andrey Antukh <niwi@niwi.nz>
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
2015-06-18 19:35:50 +02:00
.element-options {
display: flex;
2016-02-28 10:41:55 +01:00
width: 100%;
> div {
width: 100%;
}
2015-06-18 19:35:50 +02:00
.element-icons {
2020-03-03 13:14:37 +01:00
background-color: $color-gray-60;
border: 1px solid $color-gray-60;
2015-06-18 19:35:50 +02:00
border-radius: $br-small;
display: flex;
2016-02-28 10:41:55 +01:00
margin: $x-small;
2015-06-18 19:35:50 +02:00
li {
align-items: center;
2020-03-03 13:14:37 +01:00
border-right: 1px solid $color-gray-60;
2015-06-18 19:35:50 +02:00
border-radius: $br-small;
cursor: pointer;
display: flex;
flex: 1;
justify-content: center;
2015-06-18 19:35:50 +02:00
padding: $small;
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-20;
2015-06-18 19:35:50 +02:00
height: 15px;
width: 15px;
}
&:hover {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2015-06-18 19:35:50 +02:00
}
}
&.selected {
2020-03-03 13:14:37 +01:00
background-color: $color-primary;
2015-06-18 19:35:50 +02:00
svg {
fill: $color-white;
2015-06-18 19:35:50 +02:00
}
}
&:last-child {
border: none;
}
}
}
.element-set {
2020-03-03 13:14:37 +01:00
border-bottom: 1px solid $color-gray-60;
color: $color-gray-20;
2016-02-28 10:41:55 +01:00
margin: 0 $x-small;
2015-06-18 19:35:50 +02:00
.element-set-title {
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2019-12-18 13:58:46 +01:00
font-size: $fs14;
margin-top: $x-small;
padding: $x-small;
2015-06-18 19:35:50 +02:00
width: 100%;
}
}
2016-05-25 17:41:10 +02:00
.element-list {
margin-bottom: $small;
li {
align-items: center;
2020-03-03 13:14:37 +01:00
border-bottom: 1px solid $color-gray-60;
2016-05-25 17:41:10 +02:00
display: flex;
flex-direction: row;
padding: $small;
width: 100%;
.list-icon {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
2016-05-25 17:41:10 +02:00
height: 15px;
margin-right: $x-small;
width: 15px;
}
}
span {
2020-03-03 13:14:37 +01:00
color: $color-gray-20;
2016-05-25 17:41:10 +02:00
font-size: $fs14;
max-width: 75%;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.list-actions {
align-items: center;
cursor: pointer;
display: none;
margin-left: auto;
a {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-60;
2016-05-25 17:41:10 +02:00
height: 15px;
margin-left: $x-small;
width: 15px;
&:hover {
2020-03-03 13:14:37 +01:00
fill: $color-gray-20;
2016-05-25 17:41:10 +02:00
}
}
}
}
&:hover {
.list-icon {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2016-05-25 17:41:10 +02:00
}
}
span {
2020-03-03 13:14:37 +01:00
color: $color-primary;
2016-05-25 17:41:10 +02:00
}
}
&.selected {
.list-icon {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2016-05-25 17:41:10 +02:00
}
}
span {
2020-03-03 13:14:37 +01:00
color: $color-primary;
2016-05-25 17:41:10 +02:00
font-weight: bold;
}
}
}
&:hover {
.list-actions {
display: flex;
@include animation(0s,.3s,fadeIn);
}
}
}
2015-06-18 19:35:50 +02:00
}
.element-set-content {
display: flex;
flex-direction: column;
2016-02-28 10:41:55 +01:00
padding: $small $x-small;
2015-06-18 19:35:50 +02:00
.input-text {
2020-03-03 13:14:37 +01:00
background-color: $color-gray-50;
border-color: $color-gray-40;
color: $color-gray-10;
2015-06-18 19:35:50 +02:00
font-size: $fs13;
margin: $x-small;
padding: $x-small;
width: 100%;
&:focus {
2020-03-03 13:14:37 +01:00
color: lighten($color-gray-10, 8%);
border-color: $color-gray-20;
2015-06-18 19:35:50 +02:00
}
}
.input-select {
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2015-06-18 19:35:50 +02:00
&:focus {
2020-03-03 13:14:37 +01:00
color: lighten($color-gray-10, 8%);
2015-06-18 19:35:50 +02:00
}
option {
2020-03-03 13:14:37 +01:00
color: $color-gray-60;
2019-12-19 18:06:21 +01:00
background: $color-white;
font-size: $fs12;
}
2015-06-18 19:35:50 +02:00
}
.element-set-subtitle {
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2015-06-18 19:35:50 +02:00
font-size: $fs12;
width: 12rem;
2015-06-18 19:35:50 +02:00
}
.lock-size {
cursor: pointer;
width: 20%;
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-20;
2015-06-18 19:35:50 +02:00
height: 15px;
width: 15px;
&:hover {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2015-06-18 19:35:50 +02:00
}
}
&.selected {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2015-06-18 19:35:50 +02:00
}
2015-12-15 11:32:06 +02:00
}
}
2016-05-25 17:41:10 +02:00
.save-btn {
width: 100%;
}
.cancel-btn {
color: $color-danger;
text-align: center;
width: 100%;
}
.custom-select {
cursor: pointer;
border: 1px solid $color-gray-40;
padding: $x-small $big $x-small $x-small;
position: relative;
.dropdown-button {
position: absolute;
right: $x-small;
top: $small;
svg {
fill: $color-gray-40;
height: 10px;
width: 10px;
}
}
span {
font-size: $fs13;
}
.custom-select-dropdown {
position: absolute;
left: 0;
z-index: 12;
width: 200px;
max-height: 30rem;
min-width: 7rem;
overflow-y: auto;
background-color: $color-white;
border-radius: $br-small;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
li {
color: $color-gray-60;
cursor: pointer;
font-size: $fs14;
display: flex;
padding: $small;
span {
color: $color-gray-20;
margin-left: auto;
}
&.dropdown-label:not(:first-child) {
border-top: 1px solid $color-gray-10;
}
&.dropdown-label span {
margin-left: 0;
}
&:hover {
background-color: $color-primary-lighter;
}
}
}
}
.editable-select {
position: relative;
width: 100%;
height: 38px;
.input-text {
position: absolute;
top: 0;
left: 0;
width: 80%;
}
.input-select {
position: absolute;
top: 0;
left: 0;
border: none;
color: transparent;
background-color: transparent;
width: 100%;
option {
2020-03-03 13:14:37 +01:00
color: $color-gray-60;
background: $color-gray-60;
font-size: $fs12;
}
}
}
2015-12-15 11:32:06 +02:00
}
.color-th {
background-color: $color-gray-lighter;
border: 1px solid $color-gray-10;
2019-12-17 16:50:50 +01:00
border-radius: $br-small;
2015-12-15 11:32:06 +02:00
cursor: pointer;
flex-shrink: 0;
height: 25px;
margin: 5px 4px 0 0;
2015-12-15 11:32:06 +02:00
width: 25px;
2015-12-15 11:32:06 +02:00
&.palette-th {
align-items: center;
2020-03-03 13:14:37 +01:00
border: 1px solid $color-gray-30;
2015-12-15 11:32:06 +02:00
display: flex;
justify-content: center;
2015-12-15 11:32:06 +02:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
2016-04-23 12:35:50 +02:00
height: 16px;
width: 16px;
2015-12-15 11:32:06 +02:00
}
2015-12-15 11:32:06 +02:00
&:hover {
2020-03-03 13:14:37 +01:00
border-color: $color-primary;
2015-12-15 11:32:06 +02:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2015-12-15 11:32:06 +02:00
}
2015-12-15 11:32:06 +02:00
}
2015-12-15 11:32:06 +02:00
}
}
2015-12-15 11:32:06 +02:00
.align-icons {
cursor: pointer;
2016-02-28 10:41:55 +01:00
span {
2015-12-15 11:32:06 +02:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
2016-02-28 10:41:55 +01:00
height: 20px;
margin: $x-small $small;
width: 20px;
}
&:hover,
&.current {
svg {
2020-03-03 13:14:37 +01:00
fill: $color-primary;
2016-02-28 10:41:55 +01:00
}
2015-06-18 19:35:50 +02:00
}
2015-06-18 19:35:50 +02:00
}
2016-05-25 17:41:10 +02:00
2015-06-18 19:35:50 +02:00
}
2016-01-12 15:04:51 +01:00
.element-color-picker {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
2016-01-12 15:04:51 +01:00
margin: 0 4px;
2016-01-20 18:43:31 +02:00
2016-01-12 15:04:51 +01:00
.color-picker-body {
height: 100%;
margin-right: 15px;
}
2016-01-12 15:04:51 +01:00
.color-picker-bar {
2016-02-03 16:24:32 +01:00
height: 165px;
position: relative;
2016-01-12 15:04:51 +01:00
width: 15px;
2016-01-20 18:43:31 +02:00
2016-01-12 15:04:51 +01:00
.color-bar-select {
2020-03-03 13:14:37 +01:00
background-color: $color-gray-50;
2016-01-12 15:04:51 +01:00
height: 3px;
2016-01-29 00:35:45 +02:00
left: -4px;
2016-01-12 15:04:51 +01:00
position: absolute;
2016-01-29 00:35:45 +02:00
width: 23px;
2016-02-24 16:04:19 +01:00
transition: none;
2016-01-12 15:04:51 +01:00
top: 30%;
}
2016-01-12 15:04:51 +01:00
}
2016-01-12 15:04:51 +01:00
}
.orientation-icon {
margin-left: $small;
svg {
cursor: pointer;
height: 20px;
stroke: $color-gray-40;
stroke-width: 30px;
width: 20px;
}
&:hover {
svg {
stroke: $color-gray-10;
}
}
}