global.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. /**
  2. * 全局样式
  3. * @since 1.0.0
  4. * @version 1.0.0
  5. *
  6. * @markdown
  7. *
  8. * # 更新日志
  9. *
  10. * ### 2017/03/114
  11. * - [feature] input,textarea,button上的:focus伪类上移除浏览器默认增加的聚焦外框
  12. */
  13. /* 内外边距通常让各个浏览器样式的表现位置不同 */
  14. body,
  15. div,
  16. dl,
  17. dt,
  18. dd,
  19. ul,
  20. ol,
  21. li,
  22. h1,
  23. h2,
  24. h3,
  25. h4,
  26. h5,
  27. h6,
  28. pre,
  29. code,
  30. form,
  31. fieldset,
  32. legend,
  33. input,
  34. textarea,
  35. p,
  36. blockquote,
  37. th,
  38. td,
  39. hr,
  40. button,
  41. article,
  42. aside,
  43. details,
  44. figcaption,
  45. figure,
  46. footer,
  47. header,
  48. hgroup,
  49. menu,
  50. nav,
  51. section {
  52. margin: 0;
  53. padding: 0;
  54. }
  55. * {
  56. box-sizing: border-box;
  57. /* 提升动画性能 避免闪烁 msl 但是会照成字发虚,模糊,按需针对开启 */
  58. // backface-visibility: hidden
  59. /* 大于0时,会造成iOS字体模糊,提升Android动画性能 */
  60. // perspective: 0;
  61. // /*提升动画性能*/
  62. // transform: translate3d(1, 1, 1)
  63. // /*提升动画性能*/
  64. // opacity: 1
  65. }
  66. /* 更改盒子模型 */
  67. //*,
  68. //*:hover,
  69. //*:focus {
  70. // /* ios下滚动流畅 */
  71. // -webkit-overflow-scrolling: touch;
  72. //}
  73. /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
  74. html {
  75. // background-color: $ui-clr-bg-comp;
  76. font-size: $global-root-font-size;
  77. // min-height: 100vh;
  78. // min-width: 100vw;
  79. height: -webkit-fill-available;
  80. width: 100vw;
  81. -webkit-text-size-adjust: 100%;
  82. // background-color: aqua;
  83. }
  84. /* 保证层高 */
  85. body {
  86. color: $ui-clr-text-pri;
  87. // background-color: $ui-clr-bg-comp;
  88. // font-family: $global-font-family;
  89. // font-size: $global-font-size;
  90. line-height: $global-line-height;
  91. margin: 0 auto;
  92. // padding-top: env(safe-area-inset-top);
  93. // padding-left: env(safe-area-inset-left);
  94. // padding-right: env(safe-area-inset-right);
  95. // padding-bottom: env(safe-area-inset-bottom);
  96. // min-height: 100vh;
  97. // min-width: 100vw;
  98. width: 100%;
  99. height: -webkit-fill-available;
  100. text-align: justify;
  101. // user-select: none;
  102. word-break: break-all;
  103. word-wrap: break-word;
  104. }
  105. html,
  106. body {
  107. // -webkit-overflow-scrolling: touch; // 弹性滚动
  108. -webkit-tap-highlight-color: transparent;
  109. }
  110. li {
  111. list-style-type: none;
  112. }
  113. // 去掉ios android
  114. textarea,
  115. input,
  116. button {
  117. -webkit-appearance: none;
  118. appearance: none;
  119. border: 0;
  120. border-radius: 0;
  121. resize: none;
  122. -webkit-tap-highlight-color: initial;
  123. }
  124. button {
  125. background-color: transparent;
  126. line-height: 1;
  127. }
  128. select {
  129. -webkit-appearance: none;
  130. appearance: none;
  131. background: none;
  132. border: none;
  133. font-size: 100%;
  134. }
  135. input,
  136. textarea {
  137. background-color: transparent;
  138. border: 0;
  139. color: $ui-clr-text-comp; // 表单元素的字体颜色不会继承,设置为辅助文字色
  140. font-size: 1em;
  141. line-height: $global-line-height; // 表单元素的行高不会继承,设置为基础行高
  142. resize: none; // 不可调整尺寸
  143. }
  144. input::-webkit-input-placeholder {
  145. color: #b8b8b8;
  146. }
  147. input::-ms-input-placeholder {
  148. color: #b8b8b8;
  149. }
  150. input::-moz-placeholder {
  151. color: #b8b8b8;
  152. }
  153. input[type='submit'],
  154. input[type='button'],
  155. input[type='reset'] {
  156. line-height: 1;
  157. }
  158. textarea:focus,
  159. input:focus,
  160. button:focus {
  161. outline: 0;
  162. }
  163. // 去掉ios android
  164. a {
  165. color: $ui-clr-a-link;
  166. // z-index: $ui-g-zindex-map.lg // 将连接的堆叠层级升高,用以避免移动端1px问题模拟产生的无法点击问题
  167. cursor: pointer;
  168. position: relative;
  169. -webkit-tap-highlight-color: initial;
  170. text-decoration: none;
  171. -webkit-touch-callout: none;
  172. }
  173. i {
  174. font-style: normal;
  175. }
  176. b {
  177. font-weight: normal;
  178. }
  179. /* img样式初始化 */
  180. img {
  181. backface-visibility: hidden;
  182. max-width: 100%;
  183. -webkit-touch-callout: none;
  184. }
  185. /* iframe 样式初始化 */
  186. iframe {
  187. display: none;
  188. }
  189. table {
  190. border-collapse: collapse;
  191. border-spacing: 0;
  192. }
  193. .clearfix:after {
  194. content: '';
  195. display: block;
  196. height: 0;
  197. visibility: hidden;
  198. clear: both;
  199. }
  200. .clearfix {
  201. *zoom: 1;
  202. }
  203. .full {
  204. position: fixed !important;
  205. top: 0;
  206. left: 0;
  207. bottom: 0;
  208. right: 0;
  209. overflow: auto;
  210. }
  211. .bold {
  212. font-weight: bold;
  213. }
  214. .user-select-text {
  215. user-select: text;
  216. }
  217. .receipt-status {
  218. padding: 8px !important;
  219. .label {
  220. font-size: 14px;
  221. text-align: center;
  222. height: 28px;
  223. line-height: 28px;
  224. border-radius: 4px;
  225. color: #ff8c39;
  226. background-color: #fff3eb;
  227. margin-left: 8px;
  228. padding: 0 6px;
  229. &.success {
  230. color: #39dc5a;
  231. background-color: #ebfbee;
  232. }
  233. &.invalid {
  234. color: #1d1409;
  235. background-color: #e8e7e6;
  236. }
  237. span {
  238. display: inline-block;
  239. }
  240. }
  241. &--right {
  242. font-size: 15px;
  243. color: #7468f2;
  244. line-height: 20px;
  245. }
  246. .receipt-status-icon {
  247. width: 16px;
  248. height: 16px;
  249. margin-right: 4px;
  250. }
  251. }