0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 12:59:12 -05:00
penpot/frontend/resources/styles/main/partials/sidebar-element-options.scss

727 lines
12 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;
2020-04-27 14:31:57 +02:00
flex-direction: column;
2016-02-28 10:41:55 +01:00
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;
2020-04-09 09:43:04 +02:00
display: flex;
2020-04-25 18:26:17 +02:00
font-size: $fs13;
2020-04-09 09:43:04 +02:00
padding: $small $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;
2020-04-25 18:26:17 +02:00
font-size: $fs12;
2016-05-25 17:41:10 +02:00
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;
2020-04-25 18:26:17 +02:00
padding: $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: 1px solid transparent;
border-bottom-color: $color-gray-40;
2020-03-03 13:14:37 +01:00
color: $color-gray-10;
2020-04-25 18:26:17 +02:00
font-size: $fs12;
2015-06-18 19:35:50 +02:00
margin: $x-small;
padding: $x-small;
width: 100%;
&:focus {
2020-03-03 13:14:37 +01:00
color: lighten($color-gray-10, 8%);
2020-04-28 22:13:18 +02:00
border-color: $color-primary !important;
}
&:hover {
border-color: $color-gray-40;
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;
2020-04-25 18:26:17 +02:00
font-size: $fs11;
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;
}
2020-05-19 10:52:11 +02:00
}
.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);
2020-05-19 10:52:11 +02:00
hr {
margin: 0;
border-color: $color-gray-20;
}
li {
color: $color-gray-60;
cursor: pointer;
font-size: $fs14;
display: flex;
padding: $small;
span {
color: $color-gray-20;
margin-left: auto;
}
2020-04-27 14:31:57 +02:00
&.dropdown-separator:not(:last-child) {
border-bottom: 1px solid $color-gray-10;
}
&.dropdown-label:not(:first-child) {
border-top: 1px solid $color-gray-10;
}
&.dropdown-label span {
margin-left: 0;
}
&:hover {
background-color: $color-primary-lighter;
}
}
}
2020-05-14 14:08:17 +02:00
2020-05-19 10:52:11 +02:00
& li.checked-element {
padding-left: 0;
& span {
margin: 0;
color: $color-black;
}
& svg {
visibility: hidden;
width: 8px;
height: 8px;
background: none;
margin: 0.25rem;
fill: $color-black;
}
&.is-selected {
& svg {
visibility: visible;
}
}
}
2020-05-14 14:08:17 +02:00
2020-05-19 10:52:11 +02:00
.editable-select {
position: relative;
height: 38px;
margin-right: $small;
position: relative;
width: 60%;
2020-05-14 14:08:17 +02:00
2020-05-19 10:52:11 +02:00
svg {
fill: $color-gray-40;
height: 10px;
width: 10px;
}
2020-05-14 14:08:17 +02:00
2020-05-19 10:52:11 +02:00
.input-text {
left: 0;
position: absolute;
top: -1px;
width: 60%;
}
2020-05-19 10:52:11 +02:00
.input-select {
background-color: transparent;
border: none;
border-bottom: 1px solid $color-gray-40;
color: transparent;
left: 0;
position: absolute;
top: 0;
width: 100%;
option {
color: $color-gray-60;
background: $color-white;
font-size: $fs12;
}
}
2020-05-19 10:52:11 +02:00
.dropdown-button {
position: absolute;
top: 7px;
right: 0;
}
2020-05-19 10:52:11 +02:00
&.input-option {
height: 2rem;
border-bottom: 1px solid #64666A;
width: 100%;
margin-left: 0.25rem;
.input-text {
border: none;
margin: 0;
width: calc(100% - 12px);
height: 100%;
top: auto;
color: #b1b2b5;
}
}
}
2015-12-15 11:32:06 +02:00
}
2020-05-19 10:52:11 +02:00
.grid-option-main .editable-select.input-option .input-text {
padding: 0;
padding-top: 0.18rem;
}
2015-12-15 11:32:06 +02:00
.color-th {
2020-04-14 10:15:39 +02:00
background-color: $color-gray-10;
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;
2020-04-25 18:26:17 +02:00
height: 20px;
margin: 5px 4px 0 0;
2020-04-25 18:26:17 +02:00
width: 20px;
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
.row-flex.align-icons {
margin-left: 0;
}
2015-12-15 11:32:06 +02:00
.align-icons {
border: 1px solid $color-gray-60;
border-radius: $br-small;
2015-12-15 11:32:06 +02:00
cursor: pointer;
display: flex;
flex: 1;
justify-content: space-between;
margin-left: $small;
padding: $small;
&:first-child {
margin-left: 0;
}
2016-02-28 10:41:55 +01:00
span {
align-items: center;
display: flex;
2020-05-11 09:48:07 +02:00
height: 20px;
justify-content: center;
margin-right: $small;
position: relative;
2020-05-11 09:48:07 +02:00
width: 20px;
2015-12-15 11:32:06 +02:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
height: 15px;
width: 15px;
2016-02-28 10:41:55 +01:00
}
&: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
}
&:last-child {
margin-right: 0;
}
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;
}
}
}
2020-04-27 14:31:57 +02:00
.navigate-icon {
background-color: $color-gray-60;
cursor: pointer;
margin-left: $small;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
svg {
height: 16px;
fill: $color-gray-30;
width: 16px;
}
&:hover {
svg {
stroke: $color-gray-10;
}
}
}
.input-icon {
align-items: center;
display: flex;
width: 100%;
&:first-child {
margin-right: $small;
}
.icon-before {
align-items: center;
display: flex;
height: 18px;
position: relative;
width: 18px;
svg {
fill: $color-gray-30;
height: 16px;
width: 16px;
}
}
}
2020-05-14 14:08:17 +02:00
.custom-button {
cursor: pointer;
background: none;
border: none;
& svg {
width: 1rem;
height: 1rem;
fill: $color-gray-20;
}
2020-05-15 15:00:40 +02:00
&:hover svg, &.is-active svg {
fill: $color-primary;
}
2020-05-14 14:08:17 +02:00
}
.element-set-content .input-row {
& .element-set-subtitle {
width: 5.5rem;
}
}
.grid-option {
margin-bottom: 0.5rem;
}
2020-05-18 15:30:40 +02:00
.element-set-content .custom-select.input-option {
border-top: none;
border-left: none;
border-right: none;
margin-left: 0.25rem;
}
2020-05-14 14:08:17 +02:00
.element-set-content .grid-option-main {
display: flex;
padding: 0.5rem 0;
border: 1px solid $color-black;
border-radius: 4px;
&:hover {
background: #1F1F1F;
}
& .custom-select {
height: 2rem;
border: none;
border-bottom: 1px solid #65666A;
}
& .input-element {
width: 50px;
overflow: hidden;
}
& .custom-select-dropdown {
width: 96px;
}
& .input-option {
margin-left: 0.5rem;
& .custom-select-dropdown {
width: 56px;
min-width: 56px;
max-height: 10rem;
}
}
}
.grid-option-main-actions {
display: flex;
visibility: hidden;
.grid-option:hover & {
visibility: visible;
}
}
.focus-overlay {
background: $color-black;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
opacity: 0.4;
}
.element-set-content .advanced-options {
background-color: #303236;
border-radius: 4px;
left: -8px;
padding: 0.5rem;
position: relative;
top: 2px;
width: calc(100% + 16px);
}
.btn-options {
cursor: pointer;
border: 1px solid $color-black;
2020-05-18 15:30:40 +02:00
background: $color-gray-60;
2020-05-14 14:08:17 +02:00
border-radius: 2px;
2020-05-18 15:30:40 +02:00
color: $color-gray-20;
2020-05-14 14:08:17 +02:00
font-size: 11px;
line-height: 16px;
flex-grow: 1;
padding: 0.25rem 0;
&:first-child {
margin-right: 0.5rem;
}
2020-05-18 15:30:40 +02:00
&:not([disabled]):hover {
2020-05-14 14:08:17 +02:00
background: $color-primary;
color: $color-black;
}
2020-05-18 15:30:40 +02:00
&[disabled] {
opacity: 0.4;
cursor: auto;
}
2020-05-14 14:08:17 +02:00
}