tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
2 lines (1 loc) • 3.2 kB
CSS
.cookie-consent-bar{position:fixed;bottom:0;left:0;width:100%;background:#222;color:#fff;display:flex;justify-content:space-between;gap:10px;z-index:1000;box-shadow:0 -2px 5px rgba(0,0,0,.3);animation:tinyCookieConsentSlideUp var(--tiny-cookie-animation, 0.5s) ease forwards;transform:translateY(100%);opacity:0}.cookie-consent-bar>div{display:flex;padding-top:15px;padding-bottom:15px}.cookie-consent-bar>div:first-child{margin-left:15px;flex-grow:1}.cookie-consent-bar>div:last-child{margin-right:15px}.cookie-consent-bar>div p{margin:0}.cookie-consent-bar>div button{padding:8px 14px;border:none;cursor:pointer;border-radius:4px;transition:transform .2s ease,background .3s ease}.cookie-consent-bar>div button:hover{transform:translateY(-2px);filter:brightness(1.1)}.cookie-consent-bar>div button:active{transform:scale(0.95)}.cookie-consent-bar>div button.accept{background:#4caf50;color:#fff}.cookie-consent-bar>div button.reject{background:#f44336;color:#fff}.cookie-consent-bar>div button.settings{background:#2196f3;color:#fff}.cookie-consent-bar.closing{animation:tinyCookieConsentSlideDown var(--tiny-cookie-animation, 0.4s) ease forwards }@media(max-width: 600px){.cookie-consent-bar{flex-direction:column;align-items:stretch;text-align:center}.cookie-consent-bar>div{padding-top:0px;padding-bottom:0px;margin:0;justify-content:center;flex-wrap:wrap}.cookie-consent-bar>div:first-child{margin:10px 0}.cookie-consent-bar>div:last-child{margin:10px 0}.cookie-consent-bar>div button{flex:1;min-width:100px;margin:5px}}.cookie-consent-modal{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:2000;opacity:0;animation:tinyCookieConsentFadeIn var(--tiny-cookie-animation, 0.4s) ease forwards}.cookie-consent-modal .modal-content{background:#fff;padding:20px;border-radius:8px;width:300px;transform:scale(0.9);opacity:0;animation:tinyCookieConsentScaleIn var(--tiny-cookie-animation, 0.4s) ease forwards}.cookie-consent-modal h2{margin-top:0}.cookie-consent-modal label{display:block;margin-bottom:10px}.cookie-consent-modal button.save{margin-top:15px;width:100%;background:#4caf50;color:#fff;border:none;padding:10px;cursor:pointer;border-radius:4px;transition:background .3s ease,transform .2s ease}.cookie-consent-modal button.save:hover{filter:brightness(1.1);transform:translateY(-2px)}.cookie-consent-modal button.save:active{transform:scale(0.95)}.cookie-consent-modal.closing{animation:tinyCookieConsentFadeOut var(--tiny-cookie-animation, 0.4s) ease forwards }.cookie-consent-modal.closing .modal-content{animation:tinyCookieConsentScaleOut var(--tiny-cookie-animation, 0.4s) ease forwards }@keyframes tinyCookieConsentSlideUp{to{transform:translateY(0);opacity:1}}@keyframes tinyCookieConsentSlideDown{from{transform:translateY(0%);opacity:1}to{transform:translateY(100%);opacity:0}}@keyframes tinyCookieConsentFadeIn{to{opacity:1}}@keyframes tinyCookieConsentFadeOut{from{opacity:1}to{opacity:0}}@keyframes tinyCookieConsentScaleIn{to{opacity:1;transform:scale(1)}}@keyframes tinyCookieConsentScaleOut{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.9)}}