mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 08:06:11 +02: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,14 +99,12 @@
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown {
|
ul.profile-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 12;
|
z-index: 12;
|
||||||
width: 180px;
|
width: 180px;
|
||||||
|
|
||||||
ul.profile-menu {
|
|
||||||
background-color: $color-gray-60;
|
background-color: $color-gray-60;
|
||||||
border-radius: $br-small;
|
border-radius: $br-small;
|
||||||
padding: 0 $small;
|
padding: 0 $small;
|
||||||
|
@ -141,6 +139,5 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 12;
|
z-index: 12;
|
||||||
|
|
||||||
.dropdown {
|
.workspace-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 40px;
|
top: 40px;
|
||||||
left: 40px;
|
left: 40px;
|
||||||
|
@ -23,7 +23,6 @@
|
||||||
z-index: 12;
|
z-index: 12;
|
||||||
@include animation(0,.2s,fadeInDown);
|
@include animation(0,.2s,fadeInDown);
|
||||||
|
|
||||||
.workspace-menu {
|
|
||||||
background-color: $color-gray-60;
|
background-color: $color-gray-60;
|
||||||
border-radius: $br-small;
|
border-radius: $br-small;
|
||||||
padding: 0 $small;
|
padding: 0 $small;
|
||||||
|
@ -53,7 +52,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.main-icon {
|
.main-icon {
|
||||||
|
|
|
@ -5,18 +5,53 @@
|
||||||
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||||
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
// 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 {
|
.workspace-content {
|
||||||
background-color: $color-canvas;
|
background-color: $color-canvas;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
/* width: 100%; */
|
width: calc(100% - 500px);
|
||||||
/* padding: 0 230px 0 230px; */
|
|
||||||
/* position: relative; */
|
|
||||||
width: calc(100% - 460px);
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 190px;
|
right: 230px;
|
||||||
|
|
||||||
&.scrolling {
|
&.scrolling {
|
||||||
cursor: grab;
|
cursor: grab;
|
||||||
|
@ -76,7 +111,6 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.viewport {
|
.viewport {
|
||||||
|
|
||||||
&.drawing {
|
&.drawing {
|
||||||
cursor: cell;
|
cursor: cell;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,5 +38,4 @@
|
||||||
(assert (boolean? (gobj/get props "show")) "missing `show` prop")
|
(assert (boolean? (gobj/get props "show")) "missing `show` prop")
|
||||||
|
|
||||||
(when (gobj/get props "show")
|
(when (gobj/get props "show")
|
||||||
[:div.dropdown
|
(mf/element dropdown-container props)))
|
||||||
(mf/element dropdown-container props)]))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue