diff --git a/src/styles/settings.scss b/src/styles/settings.scss index a937faa..839889d 100644 --- a/src/styles/settings.scss +++ b/src/styles/settings.scss @@ -24,6 +24,36 @@ $hairlineColor: #E5E5E5 !default; } } +// 纯粹的按钮,去除小程序按钮的默认样式,仅保留居中属性 +@mixin pureButton { + position: relative; + display: block; + text-align: center; + margin: 0; + padding: 0; + outline: none; + font-size: inherit; + line-height: inherit; + border-radius: 0; + border: none; + color: inherit; + background: inherit; + overflow: auto; + box-sizing: border-box; + text-decoration: none; + -webkit-tap-highlight-color: transparent; + + &.button-hover { + color: inherit; + background: inherit; + } + + &::before, + &::after { + content: none; + } +} + // 将 375 尺寸下的像素转换为其他尺寸下的像素 @function transformPx($px) { @return unquote(($px / (375 / $designWidth)) + 'px');