You are here

menu_minipanels.css in Menu Minipanels 7.2

Same filename and directory in other branches
  1. 6 css/menu_minipanels.css
  2. 7 css/menu_minipanels.css

Custom CSS for the Menu_MiniPanels module.

File

css/menu_minipanels.css
View source
  1. /**
  2. * @file
  3. * Custom CSS for the Menu_MiniPanels module.
  4. */
  5. /*
  6. * Effects.
  7. */
  8. /*
  9. * 1. The default minipanel hover effect uses CSS3 transitions to scroll down.
  10. *
  11. * 2. CSS3 cannot transition between height:0; and height:auto; so we use
  12. * max-height as a fallback solution. Override the max-height and transition
  13. * speed to values that makes sense for your menu minipanels in your theme.
  14. *
  15. * 3. a non-zero z-index is required; any value will work, adjust in your
  16. * theme as needed.
  17. *
  18. * 4. By default, the minipanel is positioned below the menu link. See examples
  19. * further below for other positioning.
  20. */
  21. li > .menu-minipanel-panel {
  22. position: absolute;
  23. top: 100%; /* 4. */
  24. z-index: 99; /* 3. */
  25. max-height: 0; /* 2. */
  26. overflow: hidden; /* 2. */
  27. -webkit-transition: max-height 0.15s ease-out; /* 1. */
  28. -moz-transition: max-height 0.15s ease-out; /* 1. */
  29. -ms-transition: max-height 0.15s ease-out; /* 1. */
  30. -o-transition: max-height 0.15s ease-out; /* 1. */
  31. transition: max-height 0.15s ease-out; /* 1. */
  32. }
  33. li:hover > .menu-minipanel-panel {
  34. max-height: 500px; /* 2. */
  35. -webkit-transition: max-height 0.25s ease-in; /* 1. */
  36. -moz-transition: max-height 0.25s ease-in; /* 1. */
  37. -ms-transition: max-height 0.25s ease-in; /* 1. */
  38. -o-transition: max-height 0.25s ease-in; /* 1. */
  39. transition: max-height 0.25s ease-in; /* 1. */
  40. }
  41. /*
  42. * Default theming.
  43. */
  44. /* Remove list style from minipanel wrappers. */
  45. .menu-minipanel-panel,
  46. .menu-minipanel-panel > li {
  47. list-style: none;
  48. padding: 0;
  49. margin: 0;
  50. }
  51. /* Provide a solid background color for menu minipanels. */
  52. .menu-minipanel-panel .panel-display {
  53. background-color: #fff;
  54. }
  55. /**
  56. * Example layout styles for various kinds of alignment.
  57. */
  58. /* Centered */
  59. .menu-minipanel-panel {
  60. left: 50%;
  61. right: inherit;
  62. overflow-y: visible;
  63. max-width: 300px; /* Centered mega-menus require a max-width */
  64. margin-left: -150px; /* Half of max-width */
  65. }
  66. /* Right aligned */
  67. .menu-minipanel-panel {
  68. right: 0;
  69. left: inherit;
  70. margin-left: 0;
  71. max-width: inherit;
  72. }
  73. /* Left aligned (default) */
  74. .menu-minipanel-panel {
  75. left: 0;
  76. right: inherit;
  77. margin-left: 0;
  78. max-width: inherit;
  79. }
  80. /* Target minipanels using their machine name (replace underscores in machine name with hyphens). */
  81. .menu-minipanel-MINI-PANEL-MACHINE-NAME-HERE {
  82. /* Custom layout or positioning rules here */
  83. }
  84. .menu-minipanel-MINI-PANEL-MACHINE-NAME-HERE .panel-display {
  85. /* Custom style rules here */
  86. }
  87. li:hover > .menu-minipanel-MINI-PANEL-MACHINE-NAME-HERE {
  88. /* Custom hover effects here. */
  89. }
  90. /* Target specific minipanels using the adjacent (+) selector. Replace NNN with the mlid. */
  91. .menu-minipanel-NNN + .menu-minipanel-panel {
  92. /* Custom layout or positioning rules here */
  93. }
  94. .menu-minipanel-NNN + .menu-minipanel-panel .panel-display {
  95. /* Custom style rules here */
  96. }
  97. li:hover > .menu-minipanel-NNN + .menu-minipanel-panel {
  98. /* Custom hover effects here. */
  99. }
  100. /*
  101. * Superfish, Nice menus, and DHTML Menu module integration.
  102. */
  103. /* Superfish, Nice menus, and DHTML Menu provide their own theming. */
  104. .dhtml-menu .menu-minipanel-panel .panel-display,
  105. .nice-menu .menu-minipanel-panel .panel-display,
  106. .sf-menu .menu-minipanel-panel .panel-display {
  107. background-color: transparent;
  108. }
  109. /* Disable CSS3 transitions; Superfish, Nice menus, and DHTML Menu handle this via JS. */
  110. li.dhtml-menu > .menu-minipanel-panel,
  111. .nice-menu li > .menu-minipanel-panel,
  112. .sf-menu li > .menu-minipanel-panel {
  113. z-index: inherit;
  114. max-height: inherit;
  115. overflow: inherit;
  116. -webkit-transition: none;
  117. -moz-transition: none;
  118. -ms-transition: none;
  119. -o-transition: none;
  120. transition: none;
  121. }
  122. li.dhtml-menu:hover > .menu-minipanel-panel,
  123. .nice-menu li:hover > .menu-minipanel-panel,
  124. .sf-menu li:hover > .menu-minipanel-panel {
  125. max-height: inherit;
  126. -webkit-transition: none;
  127. -moz-transition: none;
  128. -ms-transition: none;
  129. -o-transition: none;
  130. transition: none;
  131. }
  132. /* DHTML Menu has its own logic for positioning elements. */
  133. li.dhtml-menu > .menu-minipanel-panel {
  134. position: inherit;
  135. }
  136. /* Reset list styles inside Mini Panels inside Superfish menus. */
  137. .sf-menu .panel-display ul,
  138. .sf-menu .panel-display li {
  139. left: inherit;
  140. left: initial;
  141. position: inherit;
  142. position: initial;
  143. top: inherit;
  144. top: initial;
  145. width: inherit;
  146. width: initial;
  147. z-index: inherit;
  148. z-index: initial;
  149. float: inherit;
  150. float: initial;
  151. }