~aw/smart-dev/trunk

« back to all changes in this revision

Viewing changes to web_smartux/static/lib/bootstrap/less/mixins/buttons.less

  • Committer: Anders Wallenquist
  • Date: 2014-09-09 11:56:02 UTC
  • Revision ID: anders.wallenquist@vertel.se-20140909115602-a3j4fuaj7jjo3t68
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Button variants
 
2
//
 
3
// Easily pump out default styles, as well as :hover, :focus, :active,
 
4
// and disabled options for all buttons
 
5
 
 
6
.button-variant(@color; @background; @border) {
 
7
  color: @color;
 
8
  background-color: @background;
 
9
  border-color: @border;
 
10
 
 
11
  &:hover,
 
12
  &:focus,
 
13
  &:active,
 
14
  &.active,
 
15
  .open > .dropdown-toggle& {
 
16
    color: @color;
 
17
    background-color: darken(@background, 10%);
 
18
        border-color: darken(@border, 12%);
 
19
  }
 
20
  &:active,
 
21
  &.active,
 
22
  .open > .dropdown-toggle& {
 
23
    background-image: none;
 
24
  }
 
25
  &.disabled,
 
26
  &[disabled],
 
27
  fieldset[disabled] & {
 
28
    &,
 
29
    &:hover,
 
30
    &:focus,
 
31
    &:active,
 
32
    &.active {
 
33
      background-color: @background;
 
34
          border-color: @border;
 
35
    }
 
36
  }
 
37
 
 
38
  .badge {
 
39
    color: @background;
 
40
    background-color: @color;
 
41
  }
 
42
}
 
43
 
 
44
// Button sizes
 
45
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
 
46
  padding: @padding-vertical @padding-horizontal;
 
47
  font-size: @font-size;
 
48
  line-height: @line-height;
 
49
  border-radius: @border-radius;
 
50
}