mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
136 lines
3.2 KiB
SCSS
136 lines
3.2 KiB
SCSS
/**
|
|
* Copyright (c) 2021 OpenLens Authors
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
* this software and associated documentation files (the "Software"), to deal in
|
|
* the Software without restriction, including without limitation the rights to
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
* subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
.HotbarMenu {
|
|
$spacing: $padding * 2;
|
|
|
|
position: relative;
|
|
text-align: center;
|
|
background: $clusterMenuBackground;
|
|
padding-top: 1px;
|
|
width: var(--hotbar-width);
|
|
overflow: hidden;
|
|
|
|
.HotbarItems {
|
|
--cellWidth: 40px;
|
|
--cellHeight: 40px;
|
|
|
|
box-sizing: content-box;
|
|
margin: 0 auto;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
padding-bottom: 8px;
|
|
|
|
&:hover {
|
|
overflow: overlay;
|
|
|
|
&::-webkit-scrollbar {
|
|
width: 0.4em;
|
|
background: transparent;
|
|
z-index: 1;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
background: var(--borderFaintColor);
|
|
}
|
|
}
|
|
|
|
.HotbarCell {
|
|
width: var(--cellWidth);
|
|
height: var(--cellHeight);
|
|
min-height: var(--cellHeight);
|
|
margin: 12px;
|
|
background: var(--clusterMenuCellBackground);
|
|
border-radius: 6px;
|
|
position: relative;
|
|
|
|
&.isDraggingOver {
|
|
background-color: #3e4148;
|
|
box-shadow: 0 0 0px 3px var(--clusterMenuBackground), 0 0 0px 6px #ffffff30;
|
|
|
|
&:not(.isDraggingOwner) {
|
|
z-index: 50;
|
|
|
|
> div:not(:empty) {
|
|
border-radius: 6px;
|
|
box-shadow: 0 0 9px #00000042;
|
|
}
|
|
|
|
&.animateUp {
|
|
> div {
|
|
transform: translate(0px, -40px)!important;
|
|
}
|
|
}
|
|
|
|
&.animateDown {
|
|
> div {
|
|
transform: translate(0px, 40px);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.animating {
|
|
&:empty {
|
|
animation: shake .6s cubic-bezier(.36,.07,.19,.97) both;
|
|
transform: translate3d(0, 0, 0);
|
|
backface-visibility: hidden;
|
|
perspective: 1000px;
|
|
}
|
|
|
|
&:not(:empty) {
|
|
.HotbarIcon {
|
|
animation: click .1s;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes shake {
|
|
10%, 90% {
|
|
transform: translate3d(-1px, 0, 0);
|
|
}
|
|
|
|
20%, 80% {
|
|
transform: translate3d(2px, 0, 0);
|
|
}
|
|
|
|
30%, 50%, 70% {
|
|
transform: translate3d(-4px, 0, 0);
|
|
}
|
|
|
|
40%, 60% {
|
|
transform: translate3d(4px, 0, 0);
|
|
}
|
|
}
|
|
|
|
@keyframes click {
|
|
0% {
|
|
margin-top: 0;
|
|
}
|
|
|
|
100% {
|
|
margin-top: 2px;
|
|
}
|
|
}
|