aboutsummaryrefslogtreecommitdiffstats
path: root/src/scss/layout/_nav.scss
blob: 98e4cb50e30b603d33b39db8c54c32fbcc9ecbd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@use "../abstracts/functions" as fun;
@use "../abstracts/placeholders";

.nav {
  text-align: center;

  &__label {
    font-weight: 600;
  }

  &__list {
    @extend %reset-list;

    .btn {
      width: 100%;
    }
  }

  &:not(&--footer) &__item {
    margin: fun.get-var(spacing-2xs) 0;
  }

  &:not(&--footer) &__link {
    background-image: linear-gradient(
      to left,
      #{fun.get-var(color-bg)} 0,
      #{fun.get-var(color-bg)} 50%,
      #{fun.get-var(color-primary)} 50%
    );
    background-position: 100% 0;
    background-size: 200% 100%;
    border: fun.convert-px(3) solid fun.get-var(color-border);
    border-radius: fun.convert-px(50);
    display: block;
    font-weight: 600;
    margin: auto;
    padding: fun.get-var(spacing-3xs);
    position: relative;
    text-decoration: none;
    transition: all 0.4s ease-in-out 0s;
    width: 75%;

    &:hover,
    &:focus {
      background-position: 0 0;
      color: fun.get-var(color-fg-inverted);
    }

    &:active {
      background-position: 100% 0;
      color: fun.get-var(color-primary-dark);
      text-decoration: fun.convert-px(1) solid underline;
    }

    &--selected {
      background: fun.get-var(color-primary-dark);
      box-shadow: inset 0 0 0 4px fun.get-var(color-bg);
      color: fun.get-var(color-fg-inverted);

      &:hover,
      &:focus {
        background: fun.get-var(color-primary-light);
      }
    }
  }

  .btn {
    margin: auto;
  }
}