0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-11 01:10:28 -05:00
penpot/frontend/resources/styles/main/partials/sidebar-element-options.scss
2020-04-07 19:52:37 +02:00

457 lines
7.1 KiB
SCSS

// 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>
.element-options {
display: flex;
width: 100%;
> div {
width: 100%;
}
.element-icons {
background-color: $color-gray-60;
border: 1px solid $color-gray-60;
border-radius: $br-small;
display: flex;
margin: $x-small;
li {
align-items: center;
border-right: 1px solid $color-gray-60;
border-radius: $br-small;
cursor: pointer;
display: flex;
flex: 1;
justify-content: center;
padding: $small;
svg {
fill: $color-gray-20;
height: 15px;
width: 15px;
}
&:hover {
svg {
fill: $color-primary;
}
}
&.selected {
background-color: $color-primary;
svg {
fill: $color-white;
}
}
&:last-child {
border: none;
}
}
}
.element-set {
border-bottom: 1px solid $color-gray-60;
color: $color-gray-20;
margin: 0 $x-small;
.element-set-title {
color: $color-gray-10;
font-size: $fs14;
margin-top: $x-small;
padding: $x-small;
width: 100%;
}
}
.element-list {
margin-bottom: $small;
li {
align-items: center;
border-bottom: 1px solid $color-gray-60;
display: flex;
flex-direction: row;
padding: $small;
width: 100%;
.list-icon {
svg {
fill: $color-gray-30;
height: 15px;
margin-right: $x-small;
width: 15px;
}
}
span {
color: $color-gray-20;
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 {
fill: $color-gray-60;
height: 15px;
margin-left: $x-small;
width: 15px;
&:hover {
fill: $color-gray-20;
}
}
}
}
&:hover {
.list-icon {
svg {
fill: $color-primary;
}
}
span {
color: $color-primary;
}
}
&.selected {
.list-icon {
svg {
fill: $color-primary;
}
}
span {
color: $color-primary;
font-weight: bold;
}
}
}
&:hover {
.list-actions {
display: flex;
@include animation(0s,.3s,fadeIn);
}
}
}
}
.element-set-content {
display: flex;
flex-direction: column;
padding: $small $x-small;
.input-text {
background-color: $color-gray-50;
border-color: $color-gray-40;
color: $color-gray-10;
font-size: $fs13;
margin: $x-small;
padding: $x-small;
width: 100%;
&:focus {
color: lighten($color-gray-10, 8%);
border-color: $color-gray-20;
}
}
.input-select {
color: $color-gray-10;
&:focus {
color: lighten($color-gray-10, 8%);
}
option {
color: $color-gray-60;
background: $color-white;
font-size: $fs12;
}
}
.element-set-subtitle {
color: $color-gray-10;
font-size: $fs12;
width: 12rem;
}
.lock-size {
cursor: pointer;
width: 20%;
svg {
fill: $color-gray-20;
height: 15px;
width: 15px;
&:hover {
fill: $color-primary;
}
}
&.selected {
svg {
fill: $color-primary;
}
}
}
.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 {
color: $color-gray-60;
background: $color-gray-60;
font-size: $fs12;
}
}
}
}
.color-th {
background-color: $color-gray-lighter;
border: 1px solid $color-gray-10;
border-radius: $br-small;
cursor: pointer;
flex-shrink: 0;
height: 25px;
margin: 5px 4px 0 0;
width: 25px;
&.palette-th {
align-items: center;
border: 1px solid $color-gray-30;
display: flex;
justify-content: center;
svg {
fill: $color-gray-30;
height: 16px;
width: 16px;
}
&:hover {
border-color: $color-primary;
svg {
fill: $color-primary;
}
}
}
}
.align-icons {
cursor: pointer;
span {
svg {
fill: $color-gray-30;
height: 20px;
margin: $x-small $small;
width: 20px;
}
&:hover,
&.current {
svg {
fill: $color-primary;
}
}
}
}
.element-color-picker {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
margin: 0 4px;
.color-picker-body {
height: 100%;
margin-right: 15px;
}
.color-picker-bar {
height: 165px;
position: relative;
width: 15px;
.color-bar-select {
background-color: $color-gray-50;
height: 3px;
left: -4px;
position: absolute;
width: 23px;
transition: none;
top: 30%;
}
}
}
.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;
}
}
}