Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

_offcanvas.scss 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /********************************
  2. offcanvas menu style
  3. ********************************/
  4. body {
  5. &.offcanvas-open {
  6. overflow-y: hidden;
  7. padding-right: 17px;
  8. @include max-screen(991) {
  9. padding-right: 0px;
  10. }
  11. }
  12. }
  13. .offcanvas-overlay {
  14. position: fixed;
  15. z-index: 999;
  16. top: 0;
  17. right: 0;
  18. bottom: 0;
  19. left: 0;
  20. display: none;
  21. background-color: $overlay-color;
  22. }
  23. // offcanvas
  24. .offcanvas {
  25. &.offcanvas-open {
  26. @include transform(translateX(0));
  27. }
  28. &.offcanvas-mobile-menu {
  29. right: auto;
  30. left: 0;
  31. transform: translateX(-100%);
  32. &.offcanvas-open {
  33. transform: translateX(0);
  34. }
  35. }
  36. visibility: visible;
  37. font-size: 14px;
  38. font-weight: fontweight(regular);
  39. position: fixed;
  40. z-index: 1000;
  41. top: 0;
  42. right: 0;
  43. left: auto;
  44. display: block;
  45. overflow: hidden;
  46. width: 400px;
  47. @include max-screen(480) {
  48. width: 300px;
  49. }
  50. height: 100vh;
  51. @include transform(translateX(100%));
  52. background-color: $color-white;
  53. box-shadow: none;
  54. @include transition(0.5s ease-in-out);
  55. .inner {
  56. padding: 20px;
  57. @include max-screen(991) {
  58. overflow-y: scroll;
  59. height: 660px;
  60. }
  61. @include max-screen(767) {
  62. height: calc(100% - 30px);
  63. }
  64. @include max-screen(480) {
  65. padding: 10px;
  66. }
  67. }
  68. .title {
  69. color: $color-dark;
  70. font-weight: fontweight(medium);
  71. }
  72. .offcanvas-close {
  73. position: relative;
  74. width: 20px;
  75. height: 50px !important;
  76. text-indent: -9999px;
  77. border: 0;
  78. background-color: transparent;
  79. &::after {
  80. position: absolute;
  81. top: calc(50% - 1px);
  82. left: 0;
  83. width: 20px;
  84. height: 2px;
  85. content: "";
  86. @include transition(0.5s ease-in-out);
  87. @include transform(rotate(-45deg));
  88. background-color: $color-dark;
  89. }
  90. &:hover:after {
  91. @include transform(rotate(0deg));
  92. }
  93. &::before {
  94. position: absolute;
  95. top: calc(50% - 1px);
  96. left: 0;
  97. width: 20px;
  98. height: 2px;
  99. content: "";
  100. @include transition(0.5s ease-in-out);
  101. @include transform(rotate(45deg));
  102. background-color: $color-dark;
  103. }
  104. &:hover:before {
  105. @include transform(rotate(180deg));
  106. }
  107. }
  108. .offcanvas-menu ul {
  109. li {
  110. position: relative;
  111. display: block;
  112. line-height: 28px;
  113. a {
  114. // color: $color-dark;
  115. display: block;
  116. position: relative;
  117. padding: 8px 20px;
  118. text-transform: capitalize;
  119. border-top: 1px solid $border-color2;
  120. font-size: 14px;
  121. font-weight: fontweight(medium);
  122. line-height: 30px;
  123. }
  124. .offcanvas-submenu {
  125. position: static;
  126. top: auto;
  127. display: none;
  128. visibility: visible;
  129. width: 100%;
  130. min-width: auto;
  131. transition: none;
  132. opacity: 1;
  133. box-shadow: none;
  134. li {
  135. line-height: inherit;
  136. position: relative;
  137. a {
  138. font-weight: fontweight(regular);
  139. padding-left: 40px;
  140. }
  141. ul a {
  142. padding-left: 60px;
  143. }
  144. }
  145. }
  146. .menu-expand {
  147. position: absolute;
  148. z-index: 2;
  149. top: 0;
  150. right: 0;
  151. width: 24px;
  152. height: 44px;
  153. cursor: pointer;
  154. background-color: transparent;
  155. &::before,
  156. &::after {
  157. position: absolute;
  158. top: 50%;
  159. left: 0;
  160. width: 14px;
  161. height: 2px;
  162. content: "";
  163. @include transition(0.5s ease-in-out);
  164. background-color: $color-dark;
  165. }
  166. &::after {
  167. @include transform(rotate(90deg));
  168. }
  169. }
  170. &.active > .menu-expand {
  171. &::after {
  172. @include transform(rotate(0) scale(0.75));
  173. }
  174. }
  175. }
  176. }
  177. .offcanvas-social {
  178. li {
  179. display: inline-block;
  180. margin: 0 10px 10px 0;
  181. line-height: 40px;
  182. padding: 0;
  183. a {
  184. position: relative;
  185. display: inline-block;
  186. vertical-align: middle;
  187. font-size: 16px;
  188. line-height: 40px;
  189. width: 40px;
  190. height: 40px;
  191. @include border-radius(50%);
  192. text-align: center;
  193. border: 2px solid transparent;
  194. z-index: 1;
  195. }
  196. }
  197. }
  198. }
  199. // offcanvas-menu
  200. // theme1
  201. .theme1 {
  202. .offcanvas-menu {
  203. li > {
  204. &:hover .menu-expand:after {
  205. background: $theme-color;
  206. }
  207. &:hover .menu-expand:before {
  208. background: $theme-color;
  209. }
  210. }
  211. }
  212. }
  213. // offcanvas-menu
  214. // offcanvas-social
  215. .theme1 {
  216. .offcanvas-social {
  217. a {
  218. color: $color-white;
  219. background: $theme-color;
  220. &:hover {
  221. background: transparent;
  222. color: $theme-color;
  223. border-color: $theme-color;
  224. }
  225. }
  226. }
  227. }
  228. // offcanvas-social
  229. /********************************
  230. offcanvas menu style ENd
  231. ********************************/