You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

163 lines
2.8 KiB

  1. // Base class
  2. //
  3. // Kickstart any navigation component with a set of style resets. Works with
  4. // `<nav>`s or `<ul>`s.
  5. .nav {
  6. padding-left: 0;
  7. margin-bottom: 0;
  8. list-style: none;
  9. }
  10. .nav-link {
  11. display: inline-block;
  12. @include hover-focus {
  13. text-decoration: none;
  14. }
  15. // Disabled state lightens text and removes hover/tab effects
  16. &.disabled {
  17. color: $nav-disabled-link-color;
  18. @include plain-hover-focus {
  19. color: $nav-disabled-link-hover-color;
  20. cursor: $cursor-disabled;
  21. background-color: transparent;
  22. }
  23. }
  24. }
  25. // Nav inline
  26. .nav-inline {
  27. .nav-item {
  28. display: inline-block;
  29. }
  30. .nav-item + .nav-item,
  31. .nav-link + .nav-link {
  32. margin-left: 1rem;
  33. }
  34. }
  35. //
  36. // Tabs
  37. //
  38. .nav-tabs {
  39. border-bottom: 1px solid $nav-tabs-border-color;
  40. @include clearfix();
  41. .nav-item {
  42. float: left;
  43. // Make the list-items overlay the bottom border
  44. margin-bottom: -1px;
  45. + .nav-item {
  46. margin-left: .2rem;
  47. }
  48. }
  49. .nav-link {
  50. display: block;
  51. padding: $nav-link-padding;
  52. border: $nav-tabs-link-border-width solid transparent;
  53. @include border-radius($border-radius $border-radius 0 0);
  54. @include hover-focus {
  55. border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
  56. }
  57. &.disabled {
  58. @include plain-hover-focus {
  59. color: $nav-disabled-link-color;
  60. background-color: transparent;
  61. border-color: transparent;
  62. }
  63. }
  64. }
  65. .nav-link.active,
  66. .nav-item.open .nav-link {
  67. @include plain-hover-focus {
  68. color: $nav-tabs-active-link-hover-color;
  69. background-color: $nav-tabs-active-link-hover-bg;
  70. border-color: $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-border-color transparent;
  71. }
  72. }
  73. }
  74. //
  75. // Pills
  76. //
  77. .nav-pills {
  78. @include clearfix();
  79. .nav-item {
  80. float: left;
  81. + .nav-item {
  82. margin-left: .2rem;
  83. }
  84. }
  85. .nav-link {
  86. display: block;
  87. padding: $nav-link-padding;
  88. @include border-radius($nav-pills-border-radius);
  89. }
  90. .nav-link.active,
  91. .nav-item.open .nav-link {
  92. @include plain-hover-focus {
  93. color: $component-active-color;
  94. cursor: default;
  95. background-color: $component-active-bg;
  96. }
  97. }
  98. }
  99. .nav-stacked {
  100. .nav-item {
  101. display: block;
  102. float: none;
  103. + .nav-item {
  104. margin-top: .2rem;
  105. margin-left: 0;
  106. }
  107. }
  108. }
  109. //
  110. // Tabbable tabs
  111. //
  112. // Hide tabbable panes to start, show them when `.active`
  113. .tab-content {
  114. > .tab-pane {
  115. display: none;
  116. }
  117. > .active {
  118. display: block;
  119. }
  120. }
  121. //
  122. // Dropdowns
  123. //
  124. .nav-tabs .dropdown-menu {
  125. // Make dropdown border overlap tab border
  126. margin-top: -1px;
  127. // Remove the top rounded corners here since there is a hard edge above the menu
  128. @include border-top-radius(0);
  129. }