_nav.scss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. // Component nav and nav/pill tabs
  2. .nav {
  3. border-radius: 0.25rem;
  4. // for component navs
  5. // to wrap border around nav component
  6. &.wrap-border {
  7. border: 1px solid $nav-component-border-color;
  8. li.nav-header {
  9. margin: 0 0.5rem;
  10. }
  11. li.nav-item,
  12. div {
  13. padding: 2px .714rem;
  14. }
  15. }
  16. // Square Border
  17. &.square-border {
  18. border-radius: 0;
  19. .nav-item {
  20. .nav-link.active {
  21. border-radius: 0;
  22. }
  23. }
  24. }
  25. // for main menu toggle lock
  26. .modern-nav-toggle {
  27. padding: 1.571rem 0;
  28. }
  29. // nav pills
  30. &.nav-pills {
  31. margin-bottom: 1rem;
  32. // nav item of nav pill
  33. .nav-item {
  34. .nav-link {
  35. border-radius: .357rem;
  36. padding: .2rem 1rem;
  37. padding-top: .3rem;
  38. font-size: 0.98rem;
  39. margin-right: 0.5rem;
  40. color: $pure-black;
  41. &.active {
  42. color: $white;
  43. }
  44. &.disabled {
  45. color: $gray-600;
  46. }
  47. &.dropdown-toggle::after {
  48. top: 1px;
  49. left: 1px;
  50. }
  51. }
  52. &.dropdown {
  53. &.show{
  54. .nav-link {
  55. color: $white;
  56. }
  57. .dropdown-item{
  58. &.active{
  59. &:hover{
  60. color: $primary;
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. // Justified Pills
  68. &.nav-justified {
  69. @include nav-justified;
  70. @include nav-tabs-justified;
  71. .nav-link {
  72. display: block;
  73. &.active {
  74. border: none;
  75. &:hover,
  76. &:focus {
  77. border: none;
  78. }
  79. }
  80. }
  81. }
  82. // Nav Active Bordered Pill
  83. &.nav-active-bordered-pill {
  84. .nav-item {
  85. a {
  86. &.nav-link {
  87. &.active {
  88. border: 1px solid $primary;
  89. border-radius: 0.25rem;
  90. color: $primary;
  91. background-color: $white;
  92. }
  93. }
  94. }
  95. }
  96. }
  97. }
  98. // Basic Nav Tabs
  99. &.nav-tabs {
  100. // box-shadow: -1px 11px 17px -10px rgba($pure-black, .04);
  101. border: none;
  102. margin-bottom: 1rem;
  103. position: relative;
  104. border-radius: 0;
  105. // Basic nav item
  106. .nav-item {
  107. position: relative;
  108. .nav-link {
  109. color: $body-color;
  110. font-size: 0.95rem;
  111. border: none;
  112. min-width: auto;
  113. font-weight: 450;
  114. padding: .61rem .635rem;
  115. border-radius: 0;
  116. &.active {
  117. border: none;
  118. position: relative;
  119. color: $primary;
  120. transition: all .2s ease;
  121. background-color: transparent;
  122. // transform: translateY(-2px);
  123. &:after{
  124. content: attr(data-before);
  125. height: 2px;
  126. width: 100%;
  127. left: 0;
  128. position: absolute;
  129. bottom: 0;
  130. top: 100%;
  131. background: linear-gradient(30deg, rgba($primary, 1), rgba($primary, .5)) !important;
  132. box-shadow: 0 0 8px 0 rgba($primary, .5) !important;
  133. transform: translateY(0px);
  134. transition: all .2s linear;
  135. }
  136. }
  137. &.dropdown-toggle {
  138. &::after {
  139. top: 1px;
  140. left: 1px;
  141. }
  142. }
  143. &.disabled {
  144. color: $gray-600;
  145. }
  146. }
  147. }
  148. // Justified Tabs
  149. &.nav-justified {
  150. @include nav-justified;
  151. @include nav-tabs-justified;
  152. .nav-item {
  153. a.nav-link {
  154. display: block;
  155. border-radius: 0;
  156. &.active {
  157. border: none;
  158. background-color: $white;
  159. }
  160. &:hover {
  161. border-color: transparent;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. // Nav Tabs Vertical
  169. .nav-vertical {
  170. overflow: hidden;
  171. .nav.nav-tabs {
  172. // nav item styles for vertical nav tabs
  173. .nav-item {
  174. .nav-link {
  175. border: none;
  176. margin-bottom: 0;
  177. &.active {
  178. border: none;
  179. border-radius: 0;
  180. &:after {
  181. transform: rotate(90deg);
  182. left: auto;
  183. right: -1.5rem;
  184. bottom: 100%;
  185. top: 1.25rem;
  186. width: 2.14rem;
  187. }
  188. }
  189. &:hover {
  190. border-right: none;
  191. }
  192. }
  193. }
  194. // vertical nav left tabs
  195. &.nav-left {
  196. float: left;
  197. display: table;
  198. margin-right: 1rem;
  199. ~.tab-content {
  200. .tab-pane {
  201. display: none;
  202. background-color: $white;
  203. overflow-y: auto;
  204. // padding-left: 1rem;
  205. &.active {
  206. display: block;
  207. }
  208. }
  209. }
  210. }
  211. // vertical right nav tabs
  212. &.nav-right {
  213. float: right;
  214. display: table;
  215. margin-left: 1rem;
  216. .nav-item {
  217. .nav-link {
  218. &.active {
  219. &:after {
  220. left: -1.5rem;
  221. }
  222. }
  223. }
  224. }
  225. ~.tab-content {
  226. .tab-pane {
  227. display: none;
  228. background-color: $white;
  229. overflow-y: auto;
  230. padding-right: 1rem;
  231. &.active {
  232. display: block;
  233. }
  234. }
  235. }
  236. }
  237. }
  238. }
  239. @media(max-width:576px) {
  240. // .nav-vertical .nav.nav-tabs.nav-left{
  241. // float: none;
  242. // }
  243. .nav-vertical .nav.nav-tabs .nav-item .nav-link.active:after{
  244. height: 0;
  245. }
  246. }