_footer.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @use 'sass:math';
  2. .footer {
  3. @include transition(bottom 0.5s ease 1s);
  4. @include row();
  5. margin-top: $mobile-nice-padding;
  6. margin-inline-start: $mobile-nice-padding;
  7. margin-inline-end: $mobile-nice-padding;
  8. z-index: 20;
  9. @include media-breakpoint-up(sm) {
  10. margin-top: 0;
  11. margin-inline-start: calc(#{$desktop-nice-padding} - 0.75em);
  12. margin-inline-end: $desktop-nice-padding;
  13. width: auto;
  14. position: fixed;
  15. bottom: 0;
  16. }
  17. &__emphasise-span-tags span {
  18. color: theme('colors.warning.100');
  19. }
  20. // Don't apply horizontal margins if nice-padding is applied in the parent
  21. .nice-padding & {
  22. margin-inline: 0;
  23. }
  24. }
  25. .footer__container {
  26. border-radius: theme('borderRadius.sm') theme('borderRadius.sm') 0 0;
  27. background: theme('colors.surface-menus');
  28. color: theme('colors.text-button');
  29. transition: transform 1s;
  30. padding: theme('spacing.1');
  31. @include media-breakpoint-down(xs) {
  32. width: 100%;
  33. &:not(:first-child) {
  34. border-radius: 0;
  35. }
  36. }
  37. @include media-breakpoint-up(sm) {
  38. padding: theme('spacing.[2.5]');
  39. margin-inline-end: 0;
  40. &:not(:first-child) {
  41. margin-inline-start: calc(-1 * theme('borderRadius.sm'));
  42. }
  43. }
  44. &.footer__container--hidden {
  45. transform: translateY(100%);
  46. @include media-breakpoint-down(xs) {
  47. display: none;
  48. }
  49. }
  50. }
  51. .footer__save-warning {
  52. font-size: theme('fontSize.14');
  53. height: 100%;
  54. display: flex;
  55. flex-direction: row;
  56. justify-content: center;
  57. p {
  58. margin: 0;
  59. }
  60. @include media-breakpoint-up(sm) {
  61. margin-inline-end: theme('spacing[1.5]');
  62. align-items: center;
  63. }
  64. }
  65. // Footer control bar for performing actions on the page
  66. .footer .actions {
  67. width: 100%;
  68. @include media-breakpoint-up(sm) {
  69. width: theme('spacing.64');
  70. }
  71. &--primary {
  72. // Support basic layout support for items added via `extra_footer_actions`
  73. align-items: stretch;
  74. display: grid;
  75. gap: theme('spacing.2');
  76. grid-auto-flow: column;
  77. .button {
  78. // There are default .button styles that would:
  79. // - set height responsively
  80. // - add a margin when there is a .button sibling
  81. // Unset these styles in favor of a fixed height and the grid gap
  82. height: $text-input-height;
  83. margin-inline-start: initial;
  84. }
  85. @include media-breakpoint-up(sm) {
  86. min-width: theme('spacing.80');
  87. width: max-content;
  88. > *:first-child {
  89. // Ensure the first child (the dropdown action usually) is always wide
  90. min-width: theme('spacing.56');
  91. }
  92. }
  93. }
  94. }
  95. .actions .button {
  96. @apply w-leading-none w-inline-flex w-items-center;
  97. font-weight: 600;
  98. padding: 0 theme('spacing.3');
  99. white-space: initial;
  100. .icon {
  101. width: theme('spacing.4');
  102. height: theme('spacing.4');
  103. margin-inline-end: theme('spacing.2');
  104. flex-shrink: 0;
  105. }
  106. }
  107. .actions .w-dropdown-button {
  108. width: 100%;
  109. .w-dropdown .button {
  110. font-size: theme('fontSize.14');
  111. font-weight: 500;
  112. }
  113. > .button {
  114. font-size: theme('fontSize.16');
  115. flex-grow: 1;
  116. }
  117. }