variables.less 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. //
  2. // Variables
  3. // --------------------------------------------------
  4. // Global values
  5. // --------------------------------------------------
  6. // Grays
  7. // -------------------------
  8. @black: #000;
  9. @grayDarker: #222;
  10. @grayDark: #333;
  11. @gray: #555;
  12. @grayLight: #999;
  13. @grayLighter: #eee;
  14. @white: #fff;
  15. // Accent colors
  16. // -------------------------
  17. @blue: #049cdb;
  18. @blueDark: #0064cd;
  19. @green: #46a546;
  20. @red: #9d261d;
  21. @yellow: #ffc40d;
  22. @orange: #f89406;
  23. @pink: #c3325f;
  24. @purple: #7a43b6;
  25. // Scaffolding
  26. // -------------------------
  27. @bodyBackground: darken(@white, 1%);
  28. @textColor: @grayDark;
  29. // Links
  30. // -------------------------
  31. @linkColor: #08c;
  32. @linkColorHover: lighten(@linkColor, 10%);
  33. // Typography
  34. // -------------------------
  35. @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
  36. @serifFontFamily: Georgia, "Times New Roman", Times, serif;
  37. @monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
  38. @baseFontSize: 14px;
  39. @baseFontFamily: @sansFontFamily;
  40. @baseLineHeight: 20px;
  41. @altFontFamily: @serifFontFamily;
  42. @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
  43. @headingsFontWeight: bold; // instead of browser default, bold
  44. @headingsColor: inherit; // empty to use BS default, @textColor
  45. // Tables
  46. // -------------------------
  47. @tableBackground: transparent; // overall background-color
  48. @tableBackgroundAccent: darken(@bodyBackground, 2%); // for striping
  49. @tableBackgroundHover: darken(@bodyBackground, 4%); // for hover
  50. @tableBorder: #ddd; // table and cell border
  51. // Buttons
  52. // -------------------------
  53. @btnBackground: darken(@grayLighter, 7%);
  54. @btnBackgroundHighlight: darken(@grayLighter, 5%);
  55. @btnBorder: #ccc;
  56. @btnPrimaryBackground: @linkColor;
  57. @btnPrimaryBackgroundHighlight: lighten(@btnPrimaryBackground, 8%);
  58. @btnInfoBackground: lighten(desaturate(@linkColor, 70%), 5%);
  59. @btnInfoBackgroundHighlight: lighten(@btnInfoBackground, 12%);
  60. @btnSuccessBackground: @green;
  61. @btnSuccessBackgroundHighlight: lighten(@btnSuccessBackground, 12%);
  62. @btnWarningBackground: darken(@orange, 2%);
  63. @btnWarningBackgroundHighlight: lighten(@btnWarningBackground, 12%);
  64. @btnDangerBackground: lighten(@red, 12%);
  65. @btnDangerBackgroundHighlight: lighten(@btnDangerBackground, 12%);
  66. @btnInverseBackground: @gray;
  67. @btnInverseBackgroundHighlight: lighten(@btnInverseBackground, 16%);
  68. // Forms
  69. // -------------------------
  70. @inputBackground: @white;
  71. @inputBorder: #ccc;
  72. @inputBorderRadius: 3px;
  73. @inputDisabledBackground: @grayLighter;
  74. @formActionsBackground: #f5f5f5;
  75. // Dropdowns
  76. // -------------------------
  77. @dropdownBackground: @white;
  78. @dropdownBorder: rgba(0,0,0,.2);
  79. @dropdownDividerTop: #e5e5e5;
  80. @dropdownDividerBottom: @white;
  81. @dropdownLinkColor: @grayDark;
  82. @dropdownLinkColorHover: @white;
  83. @dropdownLinkColorActive: @dropdownLinkColor;
  84. @dropdownLinkBackgroundActive: @linkColor;
  85. @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
  86. // COMPONENT VARIABLES
  87. // --------------------------------------------------
  88. // Z-index master list
  89. // -------------------------
  90. // Used for a bird's eye view of components dependent on the z-axis
  91. // Try to avoid customizing these :)
  92. @zindexDropdown: 1000;
  93. @zindexPopover: 1010;
  94. @zindexTooltip: 1030;
  95. @zindexFixedNavbar: 1030;
  96. @zindexModalBackdrop: 1040;
  97. @zindexModal: 1050;
  98. // Sprite icons path
  99. // -------------------------
  100. @iconSpritePath: "../img/glyphicons-halflings.png";
  101. @iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
  102. // Input placeholder text color
  103. // -------------------------
  104. @placeholderText: @grayLight;
  105. // Hr border color
  106. // -------------------------
  107. @hrBorder: @grayLighter;
  108. // Horizontal forms & lists
  109. // -------------------------
  110. @horizontalComponentOffset: 180px;
  111. // Wells
  112. // -------------------------
  113. @wellBackground: #f5f5f5;
  114. // Navbar
  115. // -------------------------
  116. @navbarCollapseWidth: 979px;
  117. @navbarHeight: 40px;
  118. @navbarBackground: @bodyBackground;
  119. @navbarBackgroundHighlight: darken(@bodyBackground, 10%);
  120. @navbarBorder: @white;
  121. @navbarText: @gray;
  122. @navbarLinkColor: @gray;
  123. @navbarLinkColorHover: @grayDark;
  124. @navbarLinkColorActive: @gray;
  125. @navbarLinkBackgroundHover: darken(@bodyBackground, 5%);
  126. @navbarLinkBackgroundActive: @navbarBackground;
  127. @navbarBrandColor: @navbarLinkColor;
  128. // Inverted navbar
  129. @navbarInverseBackground: lighten(@linkColor, 10%);
  130. @navbarInverseHeight: 64px;
  131. @navbarInverseBackgroundHighlight: lighten(@navbarInverseBackground, 5%);
  132. @navbarInverseBorder: lighten(@navbarInverseBackground, 3%);
  133. @navbarInverseText: @white;
  134. @navbarInverseLinkColor: @white;
  135. @navbarInverseLinkColorHover: @white;
  136. @navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
  137. @navbarInverseLinkBackground: darken(@navbarInverseBackground, 10%);
  138. @navbarInverseLinkBackgroundHover: lighten(@navbarInverseBackground, 60%);
  139. @navbarInverseLinkBackgroundActive: @navbarInverseBackground;
  140. @navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
  141. @navbarInverseSearchBackgroundFocus: @white;
  142. @navbarInverseSearchBorder: @navbarInverseBackground;
  143. @navbarInverseSearchPlaceholderColor: #ccc;
  144. @navbarInverseBrandColor: @navbarInverseLinkColor;
  145. // Pagination
  146. // -------------------------
  147. @paginationBackground: #fff;
  148. @paginationBorder: #ddd;
  149. @paginationActiveBackground: #f5f5f5;
  150. // Hero unit
  151. // -------------------------
  152. @heroUnitBackground: @grayLighter;
  153. @heroUnitHeadingColor: inherit;
  154. @heroUnitLeadColor: inherit;
  155. // Form states and alerts
  156. // -------------------------
  157. @warningText: #c09853;
  158. @warningBackground: #fcf8e3;
  159. @warningBorder: darken(spin(@warningBackground, -10), 3%);
  160. @errorText: #b94a48;
  161. @errorBackground: #f2dede;
  162. @errorBorder: darken(spin(@errorBackground, -10), 3%);
  163. @successText: #468847;
  164. @successBackground: #dff0d8;
  165. @successBorder: darken(spin(@successBackground, -10), 5%);
  166. @infoText: #3a87ad;
  167. @infoBackground: #d9edf7;
  168. @infoBorder: darken(spin(@infoBackground, -10), 7%);
  169. // Tooltips and popovers
  170. // -------------------------
  171. @tooltipColor: #fff;
  172. @tooltipBackground: #000;
  173. @tooltipArrowWidth: 5px;
  174. @tooltipArrowColor: @tooltipBackground;
  175. @popoverBackground: #fff;
  176. @popoverArrowWidth: 10px;
  177. @popoverArrowColor: #fff;
  178. @popoverTitleBackground: darken(@popoverBackground, 3%);
  179. // Special enhancement for popovers
  180. @popoverArrowOuterWidth: @popoverArrowWidth + 1;
  181. @popoverArrowOuterColor: rgba(0,0,0,.25);
  182. // GRID
  183. // --------------------------------------------------
  184. // Default 940px grid
  185. // -------------------------
  186. @gridColumns: 12;
  187. @gridColumnWidth: 60px;
  188. @gridGutterWidth: 20px;
  189. @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
  190. // 1200px min
  191. @gridColumnWidth1200: 70px;
  192. @gridGutterWidth1200: 30px;
  193. @gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
  194. // 768px-979px
  195. @gridColumnWidth768: 42px;
  196. @gridGutterWidth768: 20px;
  197. @gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
  198. // Fluid grid
  199. // -------------------------
  200. @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
  201. @fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
  202. // 1200px min
  203. @fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
  204. @fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
  205. // 768px-979px
  206. @fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
  207. @fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);