// Reboot
//
// Normalization of HTML elements, manually forked from Normalize.css to remove
// styles targeting irrelevant browsers while applying new styles.
//
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
// Document
//
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
// 3. Correct the line height in all browsers.
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
//    we force a non-overlapping, non-auto-hiding scrollbar to counteract.
// 6. Change the default tap highlight to be completely transparent in iOS.
// 7. rem单位由16px转化到100px,对于开发H5页面时就只需要，移动两位小数点即可
html {
  box-sizing: border-box; // 1
  line-height: 1.15; // 3
  text-size-adjust: 100%; // 4
  -ms-overflow-style: scrollbar; // 5
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
  //font-size: 100px; //7
}

*,
*::before,
*::after {
  text-size-adjust: 100%;
  box-sizing: inherit; // 1
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
  -webkit-touch-action: manipulation;
  touch-action: manipulation;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Hiragino Sans GB", "Helvetica", Arial;
}


// Body
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
// 3. 防止元素被无限放大，当窗口超过640元素居中显示
body {
  //max-width: 640px;
  margin: 0 auto; // 1
  font-size: $font-size-base;
  color: $body-color;
  user-select: none;
  background-color: $body-bg; // 2

  // iphone 6
  /*@media (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio : 2){
    max-width: 1280px;
  }

  // iphone6 plus
  @media (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio : 3){
    max-width: 2560px;
  }*/
}


*[contenteditable] {
  user-select: auto !important;
}

*:focus {
  outline: none;
}

a {
  text-decoration: none;
  background: transparent;
  outline: none;
}

html,
body {
  height: 100%;
}

/* 触发弹性滚动 */
html,
body,
.scroll-touch {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* 清除输入域内阴影 */
input,
textarea {
  border: 0;
  appearance: none;
}

/* 禁止图片保存或拷贝 */
img {
  -webkit-touch-callout: none;
  width: 100%;
  height: auto;
}

/* 禁止长按链接与图片弹出菜单 */

a,
img {
  -webkit-touch-callout: none;
}

blockquote,
button,
caption,
dd,
div,
dl,
dt,
fieldset,
figure,
form,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
html,
input,
legend,
li,
menu,
ol,
p,
pre,
table,
td,
textarea,
th,
ul {
  padding: 0;
  margin: 0;
  outline: 0;
}

address,
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
}

abbr,
body,
fieldset,
html,
iframe,
img {
  border: 0;
}

textarea {
  overflow: auto;
  resize: none;
}

li {
  list-style: none;
}

// form元素继承字体
button,
input,
textarea,
select{
  font-family: inherit;
}

.h1,
h1 {
  font-size: .36rem;
}

.h2,
h2 {
  font-size: .34rem;
}

.h3,
h3 {
  font-size: .32rem;
}

.h4,
h4 {
  font-size: .3rem;
}

.h5,
h5 {
  font-size: .28rem;
}

.h6,
h6 {
  font-size: .24rem;
}

