Summary Files Commits Branches @commit @diff @stats
path: root / src / accordions.less
blob: 810d2644f2601c2d8460e67686e008408f51fb07 (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
// Accordions
.accordion {
  .accordion-item {
    input {
      &:checked {
        & ~ .accordion-header {
          .icon {
            transform: rotate(90deg);
            
          }
        }
        & ~ .accordion-body {
          max-height: 1000px;
        }
      }
    }

    .accordion-header {
      display: block;
      padding: @unit-1 @unit-2;

      .icon {
        transition: all .2s ease;
      }
    }

    .accordion-body {
      margin-bottom: @layout-spacing;
      max-height: 0;
      overflow: hidden;
      transition: max-height .2s ease;
    }
  }
}