/**
 * Set all element as border-box, for instinctive size calculating
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@if $vd-reset {
  @import url('~normalize.css');

  /**
   * Set the root element font-size for the size unit `rem`.
   */
  :root {
    font-size: px($root-font-size);
  }

  /**
   * Restore the font-size, and set basic font style.
   */
  body {
    font-family: $font-family-base;
    font-size: px($font-size-base);
    font-size: rem($font-size-base);
    line-height: $line-height-base;
  }

  /**
   * Hide the overflow alternative text for image
   */
  img {
    overflow: hidden;
  }

  /**
   * ------------------------------------------------
   * Interactive Elements
   */

  /**
   * Remove weird in normalize.css
   */
  button,
  [type='button'],
  [type='reset'],
  [type='submit'] {
    -webkit-appearance: none;
  }

  /**
   * Style hyper link.
   */
  a {
    color: tone();
    text-decoration: none;
    outline: 0; /** Remove outline in firefox */
  }

  /**
   * Style all clickable elements.
   */
  a[href],
  button,
  [type='button'],
  [type='reset'],
  [type='submit'] {
    cursor: pointer;

    transition: all ease-in-out $button-transition-duration;
  }

  /**
   * Remove outline in Chrome
   */
  button,
  input,
  [type='button'],
  [type='reset'],
  [type='submit'] {
    outline: 0;
    &:focus {
      outline: 0;
    }
  }
}
