summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_buttons.scss
blob: a56bf350664fdc172ea3ffd4b5f8cede980a7127 (plain)
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
@use './src/styles/vendor/variables' as vv;

/* Reset checkbox success color */
.was-validated .custom-control-input:valid,
.custom-control-input.is-valid {
  ~ .custom-control-label {
    color: initial;
  }

  &:checked ~ .custom-control-label::before {
    background-color: $component-active-bg;
    border-color: $custom-control-indicator-checked-border-color;
  }

  ~ .custom-control-label::before {
    border-color: $custom-control-indicator-border-color;
  }

  &:focus ~ .custom-control-label::before {
    box-shadow: $custom-control-indicator-focus-box-shadow;
  }

  &:focus:not(:checked) ~ .custom-control-label::before {
    border-color: $custom-control-indicator-focus-border-color;
  }
}

/* Buttons */
.btn-light {
  background-color: vv.$white;
  border-color: vv.$gray-400 !important;

  &:hover {
    background-color: vv.$gray-300;
    border-color: vv.$gray-600 !important;
  }

  &:disabled {
    background-color: vv.$gray-200;
    border-color: vv.$gray-400 !important;
  }
}

// We have some inputs that don't have a corresponding formControlName,
// to be able to get the same styling and no JS errors we need use a different
// class name
.cd-form-control {
  @extend .form-control;
}

.btn {
  &,
  &:active,
  &.active {
    &:focus,
    &.focus {
      outline: 0;
    }
  }

  &.disabled {
    border: 0;
    box-shadow: none;
  }
}

.btn-primary .badge {
  background-color: vv.$gray-200;
  color: vv.$primary;
}

.btn-group > .btn > i.fa,
.cd-datatable-actions button.btn i.fa {
  /** Add space between icon and text */
  margin-right: 5px;
}

.card-footer button.btn:not(:first-child) {
  margin-left: 5px;
}