Summary Files Commits Branches @commit @diff @stats
path: root / src / _accordions.scss
blob: fd21585dc1592262445a01764c718c2619333cbc (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
// Accordions
.accordion {
  input:checked ~,
  &[open] {
    & .accordion-header {
      .icon {
        transform: rotate(90deg);
      }
    }

    & .accordion-body {
      max-height: 50rem;
    }
  }

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

    .icon {
      transition: transform .25s;
    }
  }

  .accordion-body {
    margin-bottom: $layout-spacing;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s;
  }
}

// Remove default details marker in Webkit
summary.accordion-header {
  &::-webkit-details-marker {
    display: none;
  }
}