bars.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. //
  2. // Bars
  3. // --------------------------------------------------
  4. .bar {
  5. position: fixed;
  6. right: 0;
  7. left: 0;
  8. z-index: 10;
  9. height: $bar-base-height;
  10. padding-right: $bar-side-spacing;
  11. padding-left: $bar-side-spacing;
  12. background-color: $chrome-color;
  13. border-bottom: $border-default;
  14. -webkit-backface-visibility: hidden; // Make sure the bar is visible when a modal animates in.
  15. backface-visibility: hidden;
  16. }
  17. // Modifier class to dock any bar below .bar-nav
  18. .bar-header-secondary {
  19. top: $bar-base-height;
  20. }
  21. // Modifier class for footer bars
  22. .bar-footer {
  23. bottom: 0;
  24. }
  25. // Modifier class to dock any bar above a standard bar
  26. .bar-footer-secondary {
  27. bottom: $bar-base-height;
  28. }
  29. // Modifier class to dock any bar above a .bar-tab
  30. .bar-footer-secondary-tab {
  31. bottom: $bar-tab-height;
  32. }
  33. // Give the footers the correct border
  34. .bar-footer,
  35. .bar-footer-secondary,
  36. .bar-footer-secondary-tab {
  37. border-top: $border-default;
  38. border-bottom: 0;
  39. }
  40. // Nav bar
  41. // --------------------------------------------------
  42. // Bar docked to top of viewport for showing page title and actions
  43. .bar-nav {
  44. top: 0;
  45. }
  46. // Centered text in the .bar-nav
  47. //
  48. // We position the absolutely to make sure the title is always centered
  49. .title {
  50. position: absolute;
  51. display: block;
  52. width: 100%;
  53. padding: 0;
  54. margin: 0 (-$bar-side-spacing);
  55. font-size: $font-size-default;
  56. font-weight: $font-weight;
  57. line-height: $bar-base-height;
  58. color: #000;
  59. text-align: center;
  60. white-space: nowrap;
  61. }
  62. // Retain specified title color
  63. .title a {
  64. color: inherit;
  65. }
  66. // Tab bar
  67. // --------------------------------------------------
  68. // Bar docked to bottom and used for primary app navigation
  69. .bar-tab {
  70. display: table;
  71. bottom: 0;
  72. width: 100%;
  73. height: $bar-tab-height;
  74. padding: 0;
  75. table-layout: fixed;
  76. border-top: $border-default;
  77. border-bottom: 0;
  78. // Navigational tab (Nested to be more specific for the icons in tab-items)
  79. .tab-item {
  80. display: table-cell;
  81. width: 1%;
  82. height: $bar-tab-height;
  83. color: #929292;
  84. text-align: center;
  85. vertical-align: middle;
  86. // Active states for the tab bar
  87. &.active,
  88. &:active {
  89. color: $primary-color;
  90. }
  91. // Tab icon
  92. .icon {
  93. top: 3px;
  94. width: 24px;
  95. height: 24px;
  96. padding-top: 0;
  97. padding-bottom: 0;
  98. // Make the text smaller if it's used with an icon
  99. ~ .tab-label {
  100. display: block;
  101. font-size: 11px;
  102. }
  103. }
  104. }
  105. }
  106. // Bars with buttons
  107. // --------------------------------------------------
  108. .bar .btn {
  109. position: relative;
  110. top: 7px;
  111. z-index: 20; // Position the buttons on top of .title
  112. padding: 6px 12px 7px;
  113. margin-top: 0;
  114. font-weight: $font-weight-light;
  115. // Give buttons that are floated left and right side margin
  116. &.pull-right {
  117. margin-left: $bar-side-spacing;
  118. }
  119. &.pull-left {
  120. margin-right: $bar-side-spacing;
  121. }
  122. }
  123. // Bars with link buttons (Line the text up with content)
  124. .bar .btn-link {
  125. top: 0;
  126. padding: 0;
  127. font-size: 16px;
  128. line-height: $bar-base-height;
  129. color: $primary-color;
  130. border: 0;
  131. &:active,
  132. &.active {
  133. color: darken($primary-color, 10%);
  134. }
  135. }
  136. // Bars with block buttons
  137. //
  138. // Add proper padding
  139. .bar .btn-block {
  140. top: 6px;
  141. padding: 7px 0;
  142. margin-bottom: 0;
  143. font-size: 16px; // Scale down font size to fit in bar.
  144. }
  145. // Nav buttons (Only applicable within bars)
  146. //
  147. // Buttons inside bars that sit closer against the viewport.
  148. .bar .btn-nav {
  149. &.pull-left {
  150. margin-left: -5px;
  151. .icon-left-nav {
  152. margin-right: -3px;
  153. }
  154. }
  155. &.pull-right {
  156. margin-right: -5px;
  157. .icon-right-nav {
  158. margin-left: -3px;
  159. }
  160. }
  161. }
  162. // Bars with Ratchicons
  163. // --------------------------------------------------
  164. .bar {
  165. .icon {
  166. position: relative;
  167. z-index: 20; // Position the buttons on top of .title
  168. padding-top: 10px;
  169. padding-bottom: 10px;
  170. font-size: 24px;
  171. }
  172. // Vertical center the larger icons in btns.
  173. .btn .icon {
  174. top: 3px;
  175. padding: 0;
  176. }
  177. // Handle carets in the titles
  178. .title .icon {
  179. padding: 0;
  180. // Specific postioning of the caret icon within a title. Used with popover.js.
  181. &.icon-caret {
  182. top: 4px;
  183. margin-left: -5px;
  184. }
  185. }
  186. }
  187. // Bars for search forms
  188. // --------------------------------------------------
  189. // Position/size search bar within the bar
  190. .bar input[type="search"] {
  191. height: 29px;
  192. margin: 6px 0;
  193. }
  194. // Bars with segmented controls
  195. // --------------------------------------------------
  196. // Position the control correctly inside a bar.
  197. .bar .segmented-control {
  198. top: 7px;
  199. margin: 0 auto;
  200. }