2
0

_logo.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. @keyframes tail-wag {
  2. from {
  3. transform: rotate(-3deg);
  4. }
  5. to {
  6. transform: rotate(7deg);
  7. }
  8. }
  9. .logo {
  10. display: flex;
  11. align-items: center;
  12. padding: 0.6em 1.2em;
  13. color: #aaa;
  14. -webkit-font-smoothing: auto;
  15. position: relative;
  16. &:hover {
  17. color: $color-white;
  18. }
  19. @include media-breakpoint-up(sm) {
  20. display: block;
  21. margin: 2em auto;
  22. text-align: center;
  23. }
  24. }
  25. .wagtail-logo-container__mobile {
  26. margin-right: 10px;
  27. background-color: #555;
  28. border-radius: 50%;
  29. padding: 5px 7.5px;
  30. .wagtail-logo {
  31. width: 20px;
  32. float: left;
  33. border: 0;
  34. }
  35. }
  36. .wagtail-logo-container__desktop {
  37. position: relative;
  38. width: 100px;
  39. height: 100px;
  40. background-color: #555;
  41. border-radius: 50%;
  42. margin: 0 auto;
  43. transition: all 0.25s cubic-bezier(0.28, 0.15, 0, 2.1);
  44. .page404__bg & {
  45. background-color: transparent;
  46. }
  47. .wagtail-logo-container-inner {
  48. width: 52px;
  49. height: 100px;
  50. margin: auto;
  51. position: relative;
  52. .page404__bg & {
  53. width: auto;
  54. height: auto;
  55. position: static;
  56. }
  57. }
  58. .wagtail-logo {
  59. display: block;
  60. left: 0;
  61. top: 0;
  62. width: 100%;
  63. height: 100%;
  64. position: absolute;
  65. transition: inherit;
  66. &.wagtail-logo__eye--open {
  67. // stylelint-disable-next-line declaration-no-important
  68. display: inline !important; // doesn't work without `!important`, likely a specificity issue
  69. }
  70. &.wagtail-logo__eye--closed {
  71. // stylelint-disable-next-line declaration-no-important
  72. display: none !important;
  73. }
  74. }
  75. // Wagtail 'serious' animation (nod):
  76. &.logo-serious {
  77. &:hover {
  78. transform: rotate(4deg);
  79. }
  80. }
  81. // Wagtail 'playful' animation (tail-wag, triggered by JS in base.html):
  82. &.logo-playful {
  83. &:hover {
  84. transform: rotate(8deg);
  85. transition: transform 1.2s ease;
  86. .wagtail-logo {
  87. // stylelint-disable max-nesting-depth
  88. &.wagtail-logo__tail {
  89. animation: tail-wag 0.09s alternate;
  90. animation-iteration-count: infinite;
  91. }
  92. &.wagtail-logo__eye--open {
  93. // stylelint-disable-next-line declaration-no-important
  94. display: none !important;
  95. }
  96. &.wagtail-logo__eye--closed {
  97. // stylelint-disable-next-line declaration-no-important
  98. display: inline !important;
  99. }
  100. }
  101. }
  102. }
  103. }
  104. // Media for Windows High Contrast mode
  105. @media (forced-colors: $media-forced-colours) {
  106. .wagtail-logo-container__desktop {
  107. background-color: $system-color-link-text;
  108. }
  109. }