Summary Files Commits Branches @commit @diff @stats
path: root / src / mixins.less
blob: 84af7a47d901672cd656e652c4a2977275fceb1d (plain) (blame)
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
// Core mixins
.clearfix() {
  &::after {
    clear: both;
    content: "";
    display: table;
  }
}

// Component focus shadow
.control-shadow(@color: @primary-color) {
  box-shadow: 0 0 0 .2rem fade(@color, 15%);
}

// Component transition
.control-transition() {
  transition: all .2s ease;
}

// Toast variant
.toast-variant(@color: @dark-color) {
  background: fade(@color, 90%);
  border-color: @color;
}

// Label base style
.label-base() {
  border-radius: @border-radius;
  display: inline-block;
  line-height: 1;
  padding: .3rem .4rem;
  vertical-align: baseline;
}

.label-variant(@color: @light-color, @bg-color: @primary-color) {
  background: @bg-color;
  color: @color;
}

.shadow-variant(@offset) {
  box-shadow: 0 @offset (@offset+.1rem)*2 fade(@dark-color, 30%);
}