accordion.css

Same filename in other branches
  1. 3.x modules/js_example/css/accordion.css
  2. 8.x-1.x js_example/css/accordion.css
.accordion-wrapper {
  padding: 30px;
  background: #fff;
  float: left;
  width: 80%;
  box-sizing: border-box;
  margin: 10%;
  box-shadow: 0 1.5em 85px 0 rgba(0, 0, 0, 0.2);
}

.accordion-item {
  float: left;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: "Open-sans", Arial, sans-serif;
}

.accordion-item-header {
  cursor: pointer;
  margin: 0 0 10px 0;
  padding: 10px;
  background: #2980b9;
  color: #fff;
  width: 100%;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  box-sizing: border-box;
}

.close .accordion-item-content {
  height: 0px;
  transition: height 1s ease-out;
  -webkit-transform: scaleY(0);
  -o-transform: scaleY(0);
  -ms-transform: scaleY(0);
  transform: scaleY(0);
  float: left;
  display: block;
}

.open .accordion-item-content {
  padding: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  width: 100%;
  margin: 0 0 10px 0;
  display: block;
  -webkit-transform: scaleY(1);
  -o-transform: scaleY(1);
  -ms-transform: scaleY(1);
  transform: scaleY(1);
  -webkit-transform-origin: top;
  -o-transform-origin: top;
  -ms-transform-origin: top;
  transform-origin: top;
  -webkit-transition: -webkit-transform 0.4s ease-out;
  -o-transition: -o-transform 0.4s ease;
  -ms-transition: -ms-transform 0.4s ease;
  transition: transform 0.4s ease;
  box-sizing: border-box;
}

.open .accordion-item-header {
  margin: 0;
  -webkit-border-radius: 3px 3px 0 0;
  -moz-border-radius: 3px 3px 0 0;
  border-radius: 3px 3px 0 0;
  background-color: #bdc3c7;
  color: #7f8c8d;
}

File

modules/js_example/css/accordion.css

View source
  1. .accordion-wrapper {
  2. padding: 30px;
  3. background: #fff;
  4. float: left;
  5. width: 80%;
  6. box-sizing: border-box;
  7. margin: 10%;
  8. box-shadow: 0 1.5em 85px 0 rgba(0, 0, 0, 0.2);
  9. }
  10. .accordion-item {
  11. float: left;
  12. display: block;
  13. width: 100%;
  14. box-sizing: border-box;
  15. font-family: "Open-sans", Arial, sans-serif;
  16. }
  17. .accordion-item-header {
  18. cursor: pointer;
  19. margin: 0 0 10px 0;
  20. padding: 10px;
  21. background: #2980b9;
  22. color: #fff;
  23. width: 100%;
  24. -webkit-border-radius: 3px;
  25. -moz-border-radius: 3px;
  26. border-radius: 3px;
  27. box-sizing: border-box;
  28. }
  29. .close .accordion-item-content {
  30. height: 0px;
  31. transition: height 1s ease-out;
  32. -webkit-transform: scaleY(0);
  33. -o-transform: scaleY(0);
  34. -ms-transform: scaleY(0);
  35. transform: scaleY(0);
  36. float: left;
  37. display: block;
  38. }
  39. .open .accordion-item-content {
  40. padding: 20px;
  41. background-color: #fff;
  42. border: 1px solid #ddd;
  43. width: 100%;
  44. margin: 0 0 10px 0;
  45. display: block;
  46. -webkit-transform: scaleY(1);
  47. -o-transform: scaleY(1);
  48. -ms-transform: scaleY(1);
  49. transform: scaleY(1);
  50. -webkit-transform-origin: top;
  51. -o-transform-origin: top;
  52. -ms-transform-origin: top;
  53. transform-origin: top;
  54. -webkit-transition: -webkit-transform 0.4s ease-out;
  55. -o-transition: -o-transform 0.4s ease;
  56. -ms-transition: -ms-transform 0.4s ease;
  57. transition: transform 0.4s ease;
  58. box-sizing: border-box;
  59. }
  60. .open .accordion-item-header {
  61. margin: 0;
  62. -webkit-border-radius: 3px 3px 0 0;
  63. -moz-border-radius: 3px 3px 0 0;
  64. border-radius: 3px 3px 0 0;
  65. background-color: #bdc3c7;
  66. color: #7f8c8d;
  67. }