cuiqian2004
9 天以前 2db331628bbf94deee446d6e172e98f4db474a33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* ==================
          按钮
 ==================== */
 @import './var.scss';
 
 
.gungho-btn {
  position: relative;
  border: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  overflow: visible;
  border-radius: 0;
  transform: translate(0px, 0px);
}
 
.gungho-btn::after {
  display: none;
}
 
.gungho-btn:not([class*="bg-"]) {
  background-color: transparent;
}
 
.gungho-btn[class*="line"] {
  background-color: transparent;
}
 
.gungho-btn[class*="line"]::after {
  content: " ";
  display: block;
  width: 200%;
  height: 200%;
  position: absolute;
  top: 0;
  left: 0;
  border: 1rpx solid currentColor;
  transform: scale(0.5);
  transform-origin: 0 0;
  box-sizing: border-box;
  border-radius: $gungho-radius;
  z-index: 1;
  pointer-events: none;
}
 
.gungho-btn[class*="lines"]::after {
  border: 6rpx solid currentColor;
}
 
.gungho-btn[class*="bg-"]::after {
  display: none;
}
 
.gungho-btn .gungho-btn-icon {
  border-radius: 500px;
  padding: 0;
  margin-right:6rpx;
  font-size: inherit;
}
 
 
.gungho-btn.button-hover {
  transform: translate(1rpx, 1rpx);
}
 
.block {
  display: block;
}
 
.gungho-btn.block {
  display: flex;
  width: 100%;
}
 
.gungho-btn[disabled] {
  opacity: 0.6;
}
 
@mixin set-button($type) {
  @if $type == none {
    .gungho-btn {
      padding: 0 map-get($gungho-padding, $type);
      font-size: map-get($gungho-font-sizes, $type);
      height: map-get($gungho-height, $type);
    }
    .gungho-btn.gungho-icon {
      width: map-get($gungho-height, $type);
      height: map-get($gungho-height, $type);
    }
  } @else {
    .gungho-btn.#{$type} {
      padding: 0 map-get($gungho-padding, $type);
      font-size: map-get($gungho-font-sizes, $type);
      height: map-get($gungho-height, $type);
    }
    .gungho-btn.gungho-icon.#{$type} {
      width: map-get($gungho-font-sizes, $type);
      height: map-get($gungho-font-sizes, $type);
    }
  }
}
 
@each $type in $gungho-sizes {
  @include set-button($type);
}