Blame view

node_modules/element-ui/packages/theme-chalk/src/mixins/_button.scss 2.07 KB
2a09d1a4   liuqimichale   添加宜春 天水 宣化
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
  @import "../common/var";
  @mixin button-plain($color) {
    color: $color;
    background: mix($--color-white, $color, 90%);
    border-color: mix($--color-white, $color, 60%);
  
    &:hover,
    &:focus {
      background: $color;
      border-color: $color;
      color: $--color-white;
    }
  
    &:active {
      background: mix($--color-black, $color, $--button-active-shade-percent);
      border-color: mix($--color-black, $color, $--button-active-shade-percent);
      color: $--color-white;
      outline: none;
    }
  
    &.is-disabled {
      &,
      &:hover,
      &:focus,
      &:active {
        color: mix($--color-white, $color, 40%);
        background-color: mix($--color-white, $color, 90%);
        border-color: mix($--color-white, $color, 80%);
      }
    }
  }
  
  @mixin button-variant($color, $background-color, $border-color) {
    color: $color;
    background-color: $background-color;
    border-color: $border-color;
  
    &:hover,
    &:focus {
      background: mix($--color-white, $background-color, $--button-hover-tint-percent);
      border-color: mix($--color-white, $border-color, $--button-hover-tint-percent);
      color: $color;
    }
    
    &:active {
      background: mix($--color-black, $background-color, $--button-active-shade-percent);
      border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
      color: $color;
      outline: none;
    }
  
    &.is-active {
      background: mix($--color-black, $background-color, $--button-active-shade-percent);
      border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
      color: $color;
    }
  
    &.is-disabled {
      &,
      &:hover,
      &:focus,
      &:active {
        color: $--color-white;
        background-color: mix($background-color, $--color-white);
        border-color: mix($border-color, $--color-white);
      }
    }
  
    &.is-plain {
      @include button-plain($background-color);
    }
  }
  
  @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
    padding: $padding-vertical $padding-horizontal;
    font-size: $font-size;
    border-radius: $border-radius;
    &.is-round {
      padding: $padding-vertical $padding-horizontal;
    }
  }