dotfiles

My PC Dotfiles & Website

_pagination.scss (2464B)


@import "variables";

.pagination {
  margin-top: 50px;

  input {
    align-items: center;
    height: 30px;
    width: 30px;
    padding: 8px;
    margin: 0 10px 0 2px;

    &[type="number"] {
      -moz-appearance: textfield;

      &::-webkit-inner-spin-button,
      &::-webkit-outer-spin-button {
        cursor: pointer;
        opacity: 1 !important;
        text-align: center;
        -webkit-appearance: none !important;
      }
    }
  }

  button {
    background: var(--background);
    border-color: var(--accent-secondary);
    border-radius: $corner-radius;
    color: var(--color);
    font-family: inherit;
    padding: 3px 8px;

    &:active {
      background-color: var(--accent-alpha-70);
    }

    &:focus {
      background-color: var(--accent);
      outline: 0;
    }

    &:hover {
      background-color: var(--accent-alpha-20);
      color: var(--accent-secondary);
      cursor: pointer;
    }
  }

  &__buttons {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: end;

    &-input {
      grid-column: 2;
    }

    &-previous {
      grid-column: 1;
      justify-self: left;
    }

    &-next {
      grid-column: 3;
      justify-self: right;
    }
  }

  a {
    display: flex;
    margin: 10px;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__related {
    border-top: 3.2px dotted var(--color);
    padding-top: 0.5rem;

    &-title {
      color: var(--accent-secondary-alpha-70);
    }

    &-posts {
      display: flex;
      justify-content: space-between;
      list-style: none;
      padding-left: 0;

      h3 {
        margin-top: 0;
      }

      li {
        flex: 1;

        &.next {
          text-align: right;
        }

        &.previous {
          text-align: left;
        }
      }
    }
  }
}

.button {
  appearance: none;
  border-radius: $corner-radius;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;

  + .button {
    margin-left: 10px;
  }

  a {
    display: flex;
    overflow: hidden;
    padding: 8px 16px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &.next {
    grid-column: 3;
    justify-self: left;

    &.button__icon {
      margin-left: 8px;
    }
  }

  &.previous {
    grid-column: 1;
    justify-self: right;
  }
}