Skip to content

Instantly share code, notes, and snippets.

@jessemlay
Created February 15, 2021 22:33
Show Gist options
  • Save jessemlay/e46026b4ee9620629ab1c043eb2e13e0 to your computer and use it in GitHub Desktop.
Save jessemlay/e46026b4ee9620629ab1c043eb2e13e0 to your computer and use it in GitHub Desktop.
/*Shortcut menu*/
.menu-item,
label.menu-open-button {
background: #4C6E9D;
border-radius: 50%;
width: 45px;
height: 45px;
position: absolute !important;
padding: 0;
right: 0;
bottom: 0;
color: #fff !important;
text-align: center;
line-height: 45px;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transition: -webkit-transform ease-out 200ms;
transition: -webkit-transform ease-out 200ms;
transition: transform ease-out 200ms;
transition: transform ease-out 200ms, -webkit-transform ease-out 200ms;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}
.menu-item:hover,
label.menu-open-button:hover {
background: #EDB95C;
}
.shortcut-menu {
position: fixed;
right: 1.5rem;
bottom: 2rem;
z-index: 931;
}
.menu-open {
display: none;
}
.menu-item,
label.menu-open-button {
font-size: 16px;
}
label.menu-open-button {
z-index: 932;
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
-webkit-transition-duration: 400ms;
transition-duration: 400ms;
cursor: pointer;
margin: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.app-shortcut-icon {
width: 5px;
height: 5px;
background: #ecf0f1;
color: #ecf0f1;
-webkit-transition: .3s;
transition: .3s;
-webkit-box-shadow: -8px -8px, 0 -8px, 8px -8px, -8px 0, 8px 0, -8px 8px, 0 8px, 8px 8px;
box-shadow: -8px -8px, 0 -8px, 8px -8px, -8px 0, 8px 0, -8px 8px, 0 8px, 8px 8px;
}
.menu-open:checked + .menu-open-button {
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
-webkit-transition-duration: 200ms;
transition-duration: 200ms;
-webkit-transform: scale(0.9, 0.9) translate3d(0, 0, 0);
transform: scale(0.9, 0.9) translate3d(0, 0, 0);
background: #505050;
}
.menu-open:checked + .menu-open-button .app-shortcut-icon {
-webkit-box-shadow: 0 -5px, 0 -8px, 5px 0, -5px 0, 8px 0, -8px 0, 0 8px, 0 5px !important;
box-shadow: 0 -5px, 0 -8px, 5px 0, -5px 0, 8px 0, -8px 0, 0 8px, 0 5px !important;
-webkit-transform: rotate3d(0, 0, 1, -45deg) scale3d(0.8, 0.8, 0.8);
transform: rotate3d(0, 0, 1, -45deg) scale3d(0.8, 0.8, 0.8);
}
.menu-open:checked ~ .menu-item {
-webkit-transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
.menu-open:checked ~ .menu-item:nth-child(3) {
-webkit-transition-duration: 150ms;
transition-duration: 150ms;
-webkit-transform: translate3d(0, -48px, 0);
transform: translate3d(0, -48px, 0);
}
.menu-open:checked ~ .menu-item:nth-child(4) {
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
-webkit-transform: translate3d(0, -96px, 0);
transform: translate3d(0, -96px, 0);
}
.menu-open:checked ~ .menu-item:nth-child(5) {
-webkit-transition-duration: 350ms;
transition-duration: 350ms;
-webkit-transform: translate3d(0, -144px, 0);
transform: translate3d(0, -144px, 0);
}
.menu-open:checked ~ .menu-item:nth-child(6) {
-webkit-transition-duration: 450ms;
transition-duration: 450ms;
-webkit-transform: translate3d(0, -192px, 0);
transform: translate3d(0, -192px, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment