mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
✨ Remove dom nesting on dropdown.
This commit is contained in:
parent
c663d54eb8
commit
16dab34864
4 changed files with 84 additions and 56 deletions
|
@ -99,47 +99,44 @@
|
|||
width: 25px;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
ul.profile-menu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 12;
|
||||
width: 180px;
|
||||
background-color: $color-gray-60;
|
||||
border-radius: $br-small;
|
||||
padding: 0 $small;
|
||||
|
||||
ul.profile-menu {
|
||||
background-color: $color-gray-60;
|
||||
border-radius: $br-small;
|
||||
padding: 0 $small;
|
||||
@include animation(0,.2s,fadeInDown);
|
||||
|
||||
@include animation(0,.2s,fadeInDown);
|
||||
li {
|
||||
font-size: $fs13;
|
||||
padding: $small 0;
|
||||
|
||||
li {
|
||||
font-size: $fs13;
|
||||
padding: $small 0;
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
span {
|
||||
color: $color-white;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
span {
|
||||
color: $color-white;
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
span {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $color-primary;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $color-primary;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
position: relative;
|
||||
z-index: 12;
|
||||
|
||||
.dropdown {
|
||||
.workspace-menu {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
|
@ -23,34 +23,32 @@
|
|||
z-index: 12;
|
||||
@include animation(0,.2s,fadeInDown);
|
||||
|
||||
.workspace-menu {
|
||||
background-color: $color-gray-60;
|
||||
border-radius: $br-small;
|
||||
padding: 0 $small;
|
||||
background-color: $color-gray-60;
|
||||
border-radius: $br-small;
|
||||
padding: 0 $small;
|
||||
|
||||
li {
|
||||
font-size: $fs13;
|
||||
padding: $small 0;
|
||||
li {
|
||||
font-size: $fs13;
|
||||
padding: $small 0;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: $color-white;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span {
|
||||
color: $color-white;
|
||||
color: $color-primary;
|
||||
}
|
||||
svg {
|
||||
fill: $color-primary;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span {
|
||||
color: $color-primary;
|
||||
}
|
||||
svg {
|
||||
fill: $color-primary;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,18 +5,53 @@
|
|||
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
.workspace-context-menu {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 740px;
|
||||
width: 230px;
|
||||
z-index: 12;
|
||||
|
||||
background-color: $color-gray-60;
|
||||
border-radius: $br-small;
|
||||
padding: 0 $small;
|
||||
|
||||
li {
|
||||
font-size: $fs13;
|
||||
padding: $small 0;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: $color-white;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span {
|
||||
color: $color-primary;
|
||||
}
|
||||
svg {
|
||||
fill: $color-primary;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.workspace-content {
|
||||
background-color: $color-canvas;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
/* width: 100%; */
|
||||
/* padding: 0 230px 0 230px; */
|
||||
/* position: relative; */
|
||||
width: calc(100% - 460px);
|
||||
width: calc(100% - 500px);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
right: 190px;
|
||||
right: 230px;
|
||||
|
||||
&.scrolling {
|
||||
cursor: grab;
|
||||
|
@ -76,7 +111,6 @@
|
|||
width: 100%;
|
||||
|
||||
.viewport {
|
||||
|
||||
&.drawing {
|
||||
cursor: cell;
|
||||
}
|
||||
|
|
|
@ -38,5 +38,4 @@
|
|||
(assert (boolean? (gobj/get props "show")) "missing `show` prop")
|
||||
|
||||
(when (gobj/get props "show")
|
||||
[:div.dropdown
|
||||
(mf/element dropdown-container props)]))
|
||||
(mf/element dropdown-container props)))
|
||||
|
|
Loading…
Add table
Reference in a new issue