_nav.scss 5.5 KB

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