_nav.scss 1.2 KB
Newer Older
Miykael_xxm's avatar
init  
Miykael_xxm 已提交
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 71 72 73 74 75 76 77 78 79 80 81 82
@import "burger";

.nav {
  font-size: 16px;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  background: $white;
  visibility: hidden;
  z-index: 1;

  @media screen and (min-width: $medium) {
    display: block;
    visibility: visible;
    padding-top: 3em;
    width: $navWidth;
  }
}

.nav--active .nav {
  visibility: visible;
  height: 100%;
  width: 100%;

  @media screen and (min-width: $medium) {
    width: $navWidth;
  }
}

.nav__list {
  text-align: right;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 50%;

  @media screen and (min-width: $medium) {
    width: auto;
  }

  @media screen and (max-width: $medium - 1) {
    transform: translateY(-25px);
    opacity: 0;
    .nav--active & {
      transform: translateY(0);
      opacity: 1;
      transition: all 500ms ease;
    }
  }
}

.nav__list li {
  margin-bottom: 3em;
  line-height: 1.5em;

  &:last-of-type {
    margin-bottom: 0;
  }

  @media screen and (min-width: $medium) {
    margin-bottom: 1.75em;
  }
}

.nav__list a {
  color: $grey;
  text-decoration: none;
  font-size: 2em;

  &.active {
    color: $black;
  }

  &:hover {
    color: $black;
  }

  @media screen and (min-width: $medium) {
    font-size: 1em;
  }
}