summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/collapsible.css
blob: 441d0083f1544bac96d176f17111b8cc7f3e21af (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
[data-component="collapsible"] {
  display: flex;
  flex-direction: column;

  [data-slot="trigger"] {
    cursor: pointer;
    user-select: none;

    &:focus-visible {
      outline: 2px solid var(--border-focus);
      outline-offset: 2px;
    }

    &[data-disabled] {
      cursor: not-allowed;
      opacity: 0.5;
    }
  }

  [data-slot="content"] {
    overflow: hidden;
    /* animation: slideUp 250ms ease-out; */

    /* &[data-expanded] { */
    /*   animation: slideDown 250ms ease-out; */
    /* } */
  }
}

@keyframes slideDown {
  from {
    height: 0;
  }
  to {
    height: var(--kb-collapsible-content-height);
  }
}

@keyframes slideUp {
  from {
    height: var(--kb-collapsible-content-height);
  }
  to {
    height: 0;
  }
}