aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/buttons/back-to-top/back-to-top.module.scss
blob: 10171d2a5a3cf4fe15a85b3874d803d17e1c2c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.D
@use "../../../../styles/abstracts/functions" as fun;

.link {
  --button-height: clamp(#{fun.convert-px(48)}, 8vw, #{fun.convert-px(55)});

  height: var(--button-height);
  padding: 0;

  svg {
    max-width: 100%;
    max-height: 100%;
  }

  :global {
    .arrow-head {
      transform: translateX(-10%) translateY(30%) scale(1.2);
      transition: all 0.45s ease-in-out 0s;
    }

    .arrow-bar {
      opacity: 0;
      transform: translateY(30%) scaleY(0);
      transition:
        transform 0.45s ease-in-out 0s,
        opacity 0.1s linear 0.2s;
    }
  }

  &:hover,
  &:focus {
    :global {
      .arrow-head {
        transform: translateY(0) scale(1);
      }

      .arrow-bar {
        opacity: 1;
        transform: translateY(0) scaleY(1);
      }
    }

    svg {
      :global {
        animation: pulse 1.2s ease-in-out 0.6s infinite;
      }
    }
  }

  &:active {
    svg {
      animation-play-state: paused;
    }
  }
}