variables.less 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. //
  2. // Variables
  3. // --------------------------------------------------
  4. // Global values
  5. // --------------------------------------------------
  6. // Grays
  7. // -------------------------
  8. @black: #000;
  9. @grayDarker: darken(#666666, 10%);
  10. @grayDark: #666666;
  11. @gray: #666666;
  12. @grayLight: lighten(#666666, 10%);
  13. @grayLighter: #DDDDDD;
  14. @white: #F8F8F8;
  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: @white;
  28. @textColor: @grayDark;
  29. // Links
  30. // -------------------------
  31. @linkColor: #3465A4;
  32. @linkColorHover: darken(@linkColor, 15%);
  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. // Component sizing
  46. // -------------------------
  47. // Based on 14px font-size and 20px line-height
  48. @fontSizeLarge: @baseFontSize * 1.25; // ~18px
  49. @fontSizeSmall: @baseFontSize * 0.85; // ~12px
  50. @fontSizeMini: @baseFontSize * 0.75; // ~11px
  51. @paddingLarge: 11px 19px; // 44px
  52. @paddingSmall: 2px 10px; // 26px
  53. @paddingMini: 0 6px; // 22px
  54. @baseBorderRadius: 4px;
  55. @borderRadiusLarge: 6px;
  56. @borderRadiusSmall: 3px;
  57. // Tables
  58. // -------------------------
  59. @tableBackground: transparent; // overall background-color
  60. @tableBackgroundAccent: #f9f9f9; // for striping
  61. @tableBackgroundHover: #f5f5f5; // for hover
  62. @tableBorder: @grayLighter; // table and cell border
  63. // Buttons
  64. // -------------------------
  65. @btnBackground: @white;
  66. @btnBackgroundHighlight: darken(@white, 10%);
  67. @btnBorder: #ccc;
  68. @btnPrimaryBackground: @linkColor;
  69. @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
  70. @btnInfoBackground: #5bc0de;
  71. @btnInfoBackgroundHighlight: #2f96b4;
  72. @btnSuccessBackground: #62c462;
  73. @btnSuccessBackgroundHighlight: #51a351;
  74. @btnWarningBackground: lighten(@orange, 15%);
  75. @btnWarningBackgroundHighlight: @orange;
  76. @btnDangerBackground: #ee5f5b;
  77. @btnDangerBackgroundHighlight: #bd362f;
  78. @btnInverseBackground: #444;
  79. @btnInverseBackgroundHighlight: @grayDarker;
  80. // Forms
  81. // -------------------------
  82. @inputBackground: #fff;
  83. @inputBorder: #ccc;
  84. @inputBorderRadius: @baseBorderRadius;
  85. @inputDisabledBackground: @grayLighter;
  86. @formActionsBackground: #f5f5f5;
  87. @inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
  88. // Dropdowns
  89. // -------------------------
  90. @dropdownBackground: @white;
  91. @dropdownBorder: rgba(0,0,0,.2);
  92. @dropdownDividerTop: #e5e5e5;
  93. @dropdownDividerBottom: @white;
  94. @dropdownLinkColor: @grayDark;
  95. @dropdownLinkColorHover: @white;
  96. @dropdownLinkColorActive: @white;
  97. @dropdownLinkBackgroundActive: @linkColor;
  98. @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
  99. // COMPONENT VARIABLES
  100. // --------------------------------------------------
  101. // Z-index master list
  102. // -------------------------
  103. // Used for a bird's eye view of components dependent on the z-axis
  104. // Try to avoid customizing these :)
  105. @zindexDropdown: 1000;
  106. @zindexPopover: 1010;
  107. @zindexTooltip: 1030;
  108. @zindexFixedNavbar: 1030;
  109. @zindexModalBackdrop: 1040;
  110. @zindexModal: 1050;
  111. // Sprite icons path
  112. // -------------------------
  113. @iconSpritePath: "../img/glyphicons-halflings.png";
  114. @iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
  115. // Input placeholder text color
  116. // -------------------------
  117. @placeholderText: @grayLight;
  118. // Hr border color
  119. // -------------------------
  120. @hrBorder: @grayLighter;
  121. // Horizontal forms & lists
  122. // -------------------------
  123. @horizontalComponentOffset: 180px;
  124. // Wells
  125. // -------------------------
  126. @wellBackground: #f5f5f5;
  127. // Navbar
  128. // -------------------------
  129. @navbarCollapseWidth: 979px;
  130. @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
  131. @navbarHeight: 40px;
  132. @navbarBackgroundHighlight: #729FCF;
  133. @navbarBackground: darken(@navbarBackgroundHighlight, 5%);
  134. @navbarBorder: darken(@navbarBackground, 12%);
  135. @navbarText: #F8F8F8;
  136. @navbarLinkColor: #F8F8F8;
  137. @navbarLinkColorHover: @white;
  138. @navbarLinkColorActive: @grayLighter;
  139. @navbarLinkBackgroundHover: lighten(@navbarBackground, 5%);
  140. @navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
  141. @navbarBrandColor: @navbarLinkColor;
  142. // Inverted navbar
  143. @navbarInverseBackground: #111111;
  144. @navbarInverseBackgroundHighlight: #222222;
  145. @navbarInverseBorder: #252525;
  146. @navbarInverseText: @grayLight;
  147. @navbarInverseLinkColor: @grayLight;
  148. @navbarInverseLinkColorHover: @white;
  149. @navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
  150. @navbarInverseLinkBackgroundHover: transparent;
  151. @navbarInverseLinkBackgroundActive: @navbarInverseBackground;
  152. @navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
  153. @navbarInverseSearchBackgroundFocus: @white;
  154. @navbarInverseSearchBorder: @navbarInverseBackground;
  155. @navbarInverseSearchPlaceholderColor: #ccc;
  156. @navbarInverseBrandColor: @navbarInverseLinkColor;
  157. // Pagination
  158. // -------------------------
  159. @paginationBackground: #fff;
  160. @paginationBorder: #ddd;
  161. @paginationActiveBackground: #f5f5f5;
  162. // Hero unit
  163. // -------------------------
  164. @heroUnitBackground: @grayLighter;
  165. @heroUnitHeadingColor: inherit;
  166. @heroUnitLeadColor: inherit;
  167. // Form states and alerts
  168. // -------------------------
  169. @warningText: #c09853;
  170. @warningBackground: #fcf8e3;
  171. @warningBorder: darken(spin(@warningBackground, -10), 3%);
  172. @errorText: #b94a48;
  173. @errorBackground: #f2dede;
  174. @errorBorder: darken(spin(@errorBackground, -10), 3%);
  175. @successText: #468847;
  176. @successBackground: #dff0d8;
  177. @successBorder: darken(spin(@successBackground, -10), 5%);
  178. @infoText: #3a87ad;
  179. @infoBackground: #d9edf7;
  180. @infoBorder: darken(spin(@infoBackground, -10), 7%);
  181. // Tooltips and popovers
  182. // -------------------------
  183. @tooltipColor: #fff;
  184. @tooltipBackground: #000;
  185. @tooltipArrowWidth: 5px;
  186. @tooltipArrowColor: @tooltipBackground;
  187. @popoverBackground: #fff;
  188. @popoverArrowWidth: 10px;
  189. @popoverArrowColor: #fff;
  190. @popoverTitleBackground: darken(@popoverBackground, 3%);
  191. // Special enhancement for popovers
  192. @popoverArrowOuterWidth: @popoverArrowWidth + 1;
  193. @popoverArrowOuterColor: rgba(0,0,0,.25);
  194. // GRID
  195. // --------------------------------------------------
  196. // Default 940px grid
  197. // -------------------------
  198. @gridColumns: 12;
  199. @gridColumnWidth: 60px;
  200. @gridGutterWidth: 20px;
  201. @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
  202. // 1200px min
  203. @gridColumnWidth1200: 70px;
  204. @gridGutterWidth1200: 30px;
  205. @gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
  206. // 768px-979px
  207. @gridColumnWidth768: 42px;
  208. @gridGutterWidth768: 20px;
  209. @gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
  210. // Fluid grid
  211. // -------------------------
  212. @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
  213. @fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
  214. // 1200px min
  215. @fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
  216. @fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
  217. // 768px-979px
  218. @fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
  219. @fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);