_collapsible.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .collapsible {
  2. border-top: 1px solid $collapsible-border-color;
  3. border-right: 1px solid $collapsible-border-color;
  4. border-left: 1px solid $collapsible-border-color;
  5. margin: $element-top-margin 0 $element-bottom-margin 0;
  6. @extend .z-depth-1;
  7. }
  8. .collapsible-header {
  9. &:focus {
  10. outline: 0
  11. }
  12. display: flex;
  13. cursor: pointer;
  14. -webkit-tap-highlight-color: transparent;
  15. line-height: 1.5;
  16. padding: 1rem;
  17. background-color: $collapsible-header-color;
  18. border-bottom: 1px solid $collapsible-border-color;
  19. i {
  20. width: 2rem;
  21. font-size: 1.6rem;
  22. display: inline-block;
  23. text-align: center;
  24. margin-right: 1rem;
  25. }
  26. }
  27. .keyboard-focused .collapsible-header:focus {
  28. background-color: #eee;
  29. }
  30. .collapsible-body {
  31. display: none;
  32. border-bottom: 1px solid $collapsible-border-color;
  33. box-sizing: border-box;
  34. padding: 2rem;
  35. }
  36. // Sidenav collapsible styling
  37. .sidenav,
  38. .sidenav.fixed {
  39. .collapsible {
  40. border: none;
  41. box-shadow: none;
  42. li { padding: 0; }
  43. }
  44. .collapsible-header {
  45. background-color: transparent;
  46. border: none;
  47. line-height: inherit;
  48. height: inherit;
  49. padding: 0 $sidenav-padding;
  50. &:hover { background-color: rgba(0,0,0,.05); }
  51. i { line-height: inherit; }
  52. }
  53. .collapsible-body {
  54. border: 0;
  55. background-color: $collapsible-header-color;
  56. li a {
  57. padding: 0 (7.5px + $sidenav-padding)
  58. 0 (15px + $sidenav-padding);
  59. }
  60. }
  61. }
  62. // Popout Collapsible
  63. .collapsible.popout {
  64. border: none;
  65. box-shadow: none;
  66. > li {
  67. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  68. // transform: scaleX(.92);
  69. margin: 0 24px;
  70. transition: margin .35s cubic-bezier(0.250, 0.460, 0.450, 0.940);
  71. }
  72. > li.active {
  73. box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  74. margin: 16px 0;
  75. // transform: scaleX(1);
  76. }
  77. }