Blame view

app/bower_components/bootstrap/less/buttons.less 3.58 KB
f986e111b   TRUONG   add libs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  //
  // Buttons
  // --------------------------------------------------
  
  
  // Base styles
  // --------------------------------------------------
  
  .btn {
    display: inline-block;
    margin-bottom: 0; // For input.btn
    font-weight: @btn-font-weight;
    text-align: center;
    vertical-align: middle;
87c93a029   Dang YoungWorld   add modal
15
    touch-action: manipulation;
f986e111b   TRUONG   add libs
16
17
18
19
    cursor: pointer;
    background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
    border: 1px solid transparent;
    white-space: nowrap;
87c93a029   Dang YoungWorld   add modal
20
    .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);
f986e111b   TRUONG   add libs
21
    .user-select(none);
87c93a029   Dang YoungWorld   add modal
22
23
24
25
26
27
28
    &,
    &:active,
    &.active {
      &:focus,
      &.focus {
        .tab-focus();
      }
f986e111b   TRUONG   add libs
29
30
31
    }
  
    &:hover,
87c93a029   Dang YoungWorld   add modal
32
33
    &:focus,
    &.focus {
f986e111b   TRUONG   add libs
34
35
36
37
38
39
40
41
42
43
44
45
46
47
      color: @btn-default-color;
      text-decoration: none;
    }
  
    &:active,
    &.active {
      outline: 0;
      background-image: none;
      .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
    }
  
    &.disabled,
    &[disabled],
    fieldset[disabled] & {
87c93a029   Dang YoungWorld   add modal
48
      cursor: @cursor-disabled;
f986e111b   TRUONG   add libs
49
50
51
      .opacity(.65);
      .box-shadow(none);
    }
87c93a029   Dang YoungWorld   add modal
52
53
54
55
56
57
58
  
    a& {
      &.disabled,
      fieldset[disabled] & {
        pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
      }
    }
f986e111b   TRUONG   add libs
59
60
61
62
63
64
65
66
67
68
69
70
  }
  
  
  // Alternate buttons
  // --------------------------------------------------
  
  .btn-default {
    .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
  }
  .btn-primary {
    .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
  }
f986e111b   TRUONG   add libs
71
72
73
74
75
76
77
78
  // Success appears as green
  .btn-success {
    .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
  }
  // Info appears as blue-green
  .btn-info {
    .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
  }
87c93a029   Dang YoungWorld   add modal
79
80
81
82
83
84
85
86
  // Warning appears as orange
  .btn-warning {
    .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
  }
  // Danger and error appear as red
  .btn-danger {
    .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
  }
f986e111b   TRUONG   add libs
87
88
89
90
91
92
93
94
95
  
  
  // Link buttons
  // -------------------------
  
  // Make a button look and behave like a link
  .btn-link {
    color: @link-color;
    font-weight: normal;
f986e111b   TRUONG   add libs
96
97
98
99
    border-radius: 0;
  
    &,
    &:active,
87c93a029   Dang YoungWorld   add modal
100
    &.active,
f986e111b   TRUONG   add libs
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    &[disabled],
    fieldset[disabled] & {
      background-color: transparent;
      .box-shadow(none);
    }
    &,
    &:hover,
    &:focus,
    &:active {
      border-color: transparent;
    }
    &:hover,
    &:focus {
      color: @link-hover-color;
87c93a029   Dang YoungWorld   add modal
115
      text-decoration: @link-hover-decoration;
f986e111b   TRUONG   add libs
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
      background-color: transparent;
    }
    &[disabled],
    fieldset[disabled] & {
      &:hover,
      &:focus {
        color: @btn-link-disabled-color;
        text-decoration: none;
      }
    }
  }
  
  
  // Button Sizes
  // --------------------------------------------------
  
  .btn-lg {
    // line-height: ensure even-numbered height of button next to large input
87c93a029   Dang YoungWorld   add modal
134
    .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);
f986e111b   TRUONG   add libs
135
136
137
  }
  .btn-sm {
    // line-height: ensure proper height of button next to small input
87c93a029   Dang YoungWorld   add modal
138
    .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
f986e111b   TRUONG   add libs
139
140
  }
  .btn-xs {
87c93a029   Dang YoungWorld   add modal
141
    .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
f986e111b   TRUONG   add libs
142
143
144
145
146
147
148
149
150
  }
  
  
  // Block button
  // --------------------------------------------------
  
  .btn-block {
    display: block;
    width: 100%;
f986e111b   TRUONG   add libs
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
  }
  
  // Vertically space out multiple block buttons
  .btn-block + .btn-block {
    margin-top: 5px;
  }
  
  // Specificity overrides
  input[type="submit"],
  input[type="reset"],
  input[type="button"] {
    &.btn-block {
      width: 100%;
    }
  }