123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- @keyframes tail-wag {
- from {
- transform: rotate(-3deg);
- }
- to {
- transform: rotate(7deg);
- }
- }
- .logo {
- display: flex;
- align-items: center;
- padding: 0.6em 1.2em;
- color: #aaa;
- -webkit-font-smoothing: auto;
- position: relative;
- &:hover {
- color: $color-white;
- }
- @include media-breakpoint-up(sm) {
- display: block;
- margin: 2em auto;
- text-align: center;
- }
- }
- .wagtail-logo-container__mobile {
- margin-right: 10px;
- background-color: #555;
- border-radius: 50%;
- padding: 5px 7.5px;
- .wagtail-logo {
- width: 20px;
- float: left;
- border: 0;
- }
- }
- .wagtail-logo-container__desktop {
- position: relative;
- width: 100px;
- height: 100px;
- background-color: #555;
- border-radius: 50%;
- margin: 0 auto;
- transition: all 0.25s cubic-bezier(0.28, 0.15, 0, 2.1);
- .page404__bg & {
- background-color: transparent;
- }
- .wagtail-logo-container-inner {
- width: 52px;
- height: 100px;
- margin: auto;
- position: relative;
- .page404__bg & {
- width: auto;
- height: auto;
- position: static;
- }
- }
- .wagtail-logo {
- display: block;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- position: absolute;
- transition: inherit;
- &.wagtail-logo__eye--open {
- // stylelint-disable-next-line declaration-no-important
- display: inline !important; // doesn't work without `!important`, likely a specificity issue
- }
- &.wagtail-logo__eye--closed {
- // stylelint-disable-next-line declaration-no-important
- display: none !important;
- }
- }
- // Wagtail 'serious' animation (nod):
- &.logo-serious {
- &:hover {
- transform: rotate(4deg);
- }
- }
- // Wagtail 'playful' animation (tail-wag, triggered by JS in base.html):
- &.logo-playful {
- &:hover {
- transform: rotate(8deg);
- transition: transform 1.2s ease;
- .wagtail-logo {
- // stylelint-disable max-nesting-depth
- &.wagtail-logo__tail {
- animation: tail-wag 0.09s alternate;
- animation-iteration-count: infinite;
- }
- &.wagtail-logo__eye--open {
- // stylelint-disable-next-line declaration-no-important
- display: none !important;
- }
- &.wagtail-logo__eye--closed {
- // stylelint-disable-next-line declaration-no-important
- display: inline !important;
- }
- }
- }
- }
- }
- // Media for Windows High Contrast mode
- @media (forced-colors: $media-forced-colours) {
- .wagtail-logo-container__desktop {
- background-color: $system-color-link-text;
- }
- }
|