Accordion.scss 1.17 KB
Newer Older
1 2 3
@import 'src/styles/common';

.accordionDefault {
4
  border: 2px solid $medium-light-grey;
5 6 7
  border-radius: 2px;
}

8
.accordionItemDefault:not(:first-child) {
9
  border-top: 2px solid $medium-light-grey;
10 11 12
}

.accordionButtonDefault {
Andrey Azov's avatar
Andrey Azov committed
13 14 15
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.6rem;
16 17 18 19 20 21 22 23 24
  color: #444;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  position: relative;
}

25
.accordionButtonDisabled {
Andrey Azov's avatar
Andrey Azov committed
26
  display: block;
27 28 29
  background-color: $light-grey;
  color: $grey;
  cursor: default;
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
}

.accordionButtonDefault[aria-expanded='true']::before,
.accordionButtonDefault[aria-selected='true']::before {
  top: 15px;
  transform: rotate(-45deg);
}

.accordionButtonDefault[aria-expanded='true']::after,
.accordionButtonDefault[aria-selected='true']::after {
  top: 15px;
  transform: rotate(45deg);
}

.accordionPanelDefault {
45
  background: $light-grey;
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  animation: fadein 0.2s ease-in;
}

/* -------------------------------------------------- */
/* ---------------- Animation part ------------------ */
/* -------------------------------------------------- */

@keyframes fadein {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}