variables.less 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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: #cf402e;
  21. @yellow: #ffc40d;
  22. @orange: #f89406;
  23. @pink: #c3325f;
  24. @purple: #7a43b6;
  25. // Scaffolding
  26. // -------------------------
  27. @bodyBackground: #FBFBFB;
  28. @textColor: @grayDark;
  29. // Links
  30. // -------------------------
  31. @linkColor: #08c;
  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: #ddd; // 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: @white;
  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: 50px;
  132. @navbarBackgroundHighlight: #ffffff;
  133. @navbarBackground: darken(@bodyBackground, 3%);
  134. @navbarBorder: darken(@navbarBackground, 8%);
  135. @navbarText: #777;
  136. @navbarLinkColor: #777;
  137. @navbarLinkColorHover: @grayDark;
  138. @navbarLinkColorActive: @gray;
  139. @navbarLinkBackgroundHover: transparent;
  140. @navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
  141. @navbarBrandColor: @linkColor;
  142. @navbarMottoColor: darken(@navbarBackground, 20%);
  143. // Inverted navbar
  144. @navbarInverseBackground: #111111;
  145. @navbarInverseBackgroundHighlight: #222222;
  146. @navbarInverseBorder: #252525;
  147. @navbarInverseText: @grayLight;
  148. @navbarInverseLinkColor: @grayLight;
  149. @navbarInverseLinkColorHover: @white;
  150. @navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
  151. @navbarInverseLinkBackgroundHover: transparent;
  152. @navbarInverseLinkBackgroundActive: @navbarInverseBackground;
  153. @navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
  154. @navbarInverseSearchBackgroundFocus: @white;
  155. @navbarInverseSearchBorder: @navbarInverseBackground;
  156. @navbarInverseSearchPlaceholderColor: #ccc;
  157. @navbarInverseBrandColor: @navbarInverseLinkColor;
  158. // Footer
  159. // -------------------------
  160. @footerHeight: 80px;
  161. @footerBackground: darken(@bodyBackground, 5%);
  162. @footerBorder: darken(@footerBackground, 8%);
  163. // Pagination
  164. // -------------------------
  165. @paginationBackground: #fff;
  166. @paginationBorder: #ddd;
  167. @paginationActiveBackground: #f5f5f5;
  168. // Hero unit
  169. // -------------------------
  170. @heroUnitBackground: @grayLighter;
  171. @heroUnitHeadingColor: inherit;
  172. @heroUnitLeadColor: inherit;
  173. // Form states and alerts
  174. // -------------------------
  175. @warningText: #c09853;
  176. @warningBackground: #fcf8e3;
  177. @warningBorder: darken(spin(@warningBackground, -10), 3%);
  178. @errorText: #b94a48;
  179. @errorBackground: #f2dede;
  180. @errorBorder: darken(spin(@errorBackground, -10), 3%);
  181. @successText: #468847;
  182. @successBackground: #dff0d8;
  183. @successBorder: darken(spin(@successBackground, -10), 5%);
  184. @infoText: #3a87ad;
  185. @infoBackground: #d9edf7;
  186. @infoBorder: darken(spin(@infoBackground, -10), 7%);
  187. // Tooltips and popovers
  188. // -------------------------
  189. @tooltipColor: #fff;
  190. @tooltipBackground: #000;
  191. @tooltipArrowWidth: 5px;
  192. @tooltipArrowColor: @tooltipBackground;
  193. @popoverBackground: #fff;
  194. @popoverArrowWidth: 10px;
  195. @popoverArrowColor: #fff;
  196. @popoverTitleBackground: darken(@popoverBackground, 3%);
  197. // Special enhancement for popovers
  198. @popoverArrowOuterWidth: @popoverArrowWidth + 1;
  199. @popoverArrowOuterColor: rgba(0,0,0,.25);
  200. // GRID
  201. // --------------------------------------------------
  202. // Default 940px grid
  203. // -------------------------
  204. @gridColumns: 12;
  205. @gridColumnWidth: 60px;
  206. @gridGutterWidth: 20px;
  207. @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
  208. // 1200px min
  209. @gridColumnWidth1200: 70px;
  210. @gridGutterWidth1200: 30px;
  211. @gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
  212. // 768px-979px
  213. @gridColumnWidth768: 42px;
  214. @gridGutterWidth768: 20px;
  215. @gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
  216. // Fluid grid
  217. // -------------------------
  218. @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
  219. @fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
  220. // 1200px min
  221. @fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
  222. @fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
  223. // 768px-979px
  224. @fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
  225. @fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);