mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
💄(composer): Shadow on pointer of floating toolbar
This commit is contained in:
parent
bb824f36fa
commit
bb321f4bd2
|
@ -215,7 +215,10 @@ class FloatingToolbar extends React.Component
|
||||||
return styles
|
return styles
|
||||||
|
|
||||||
_renderPointer: =>
|
_renderPointer: =>
|
||||||
unless @state.hidePointer
|
return false if @state.hidePointer
|
||||||
return <div className="toolbar-pointer" style={@_toolbarPointerStyles()}></div>
|
<div className="toolbar-pointer-container" style={@_toolbarPointerStyles()}>
|
||||||
|
<div className="shadow"></div>
|
||||||
|
<div className="foreground"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
module.exports = FloatingToolbar
|
module.exports = FloatingToolbar
|
||||||
|
|
|
@ -42,24 +42,35 @@
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-pointer {
|
.toolbar-pointer-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 22.5px;
|
width: 23px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
background: transparent url('images/tooltip/tooltip-bg-pointer@2x.png') no-repeat;
|
|
||||||
background-size: 22.5px 9.5px;
|
div {
|
||||||
margin-left: -11.2px;
|
-webkit-mask-image: url('images/tooltip/tooltip-bg-pointer@2x.png');
|
||||||
|
background-color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
zoom: 0.5;
|
||||||
|
width: 45px;
|
||||||
|
height: 21px;
|
||||||
|
&.shadow {
|
||||||
|
-webkit-mask-image: url('images/tooltip/tooltip-bg-pointer-shadow@2x.png');
|
||||||
|
background-color: fade(@black, 22%);
|
||||||
|
transform: translateY(0.5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.above {
|
&.above {
|
||||||
.toolbar-pointer {
|
.toolbar-pointer-container {
|
||||||
transform: rotate(0deg);
|
transform: translateX(-11px) rotate(0deg);
|
||||||
bottom: -9px;
|
bottom: -9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.below {
|
&.below {
|
||||||
.toolbar-pointer {
|
.toolbar-pointer-container {
|
||||||
transform: rotate(180deg);
|
transform: translateX(-11px) rotate(180deg);
|
||||||
top: -9px;
|
top: -9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue