variables.less 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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. // 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: darken(@bodyBackground, 2%); // for striping
  61. @tableBackgroundHover: darken(@bodyBackground, 4%); // for hover
  62. @tableBorder: #ddd; // table and cell border
  63. // Buttons
  64. // -------------------------
  65. @btnBackground: darken(@grayLighter, 7%);
  66. @btnBackgroundHighlight: darken(@grayLighter, 5%);
  67. @btnBorder: #ccc;
  68. @btnPrimaryBackground: @linkColor;
  69. @btnPrimaryBackgroundHighlight: lighten(@btnPrimaryBackground, 8%);
  70. @btnInfoBackground: lighten(desaturate(@linkColor, 70%), 5%);
  71. @btnInfoBackgroundHighlight: lighten(@btnInfoBackground, 12%);
  72. @btnSuccessBackground: @green;
  73. @btnSuccessBackgroundHighlight: lighten(@btnSuccessBackground, 12%);
  74. @btnWarningBackground: darken(@orange, 2%);
  75. @btnWarningBackgroundHighlight: lighten(@btnWarningBackground, 12%);
  76. @btnDangerBackground: lighten(@red, 12%);
  77. @btnDangerBackgroundHighlight: lighten(@btnDangerBackground, 12%);
  78. @btnInverseBackground: @gray;
  79. @btnInverseBackgroundHighlight: lighten(@btnInverseBackground, 16%);
  80. // Forms
  81. // -------------------------
  82. @inputBackground: @white;
  83. @inputBorder: #ccc;
  84. @inputBorderRadius: 3px;
  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: @dropdownLinkColor;
  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. @navbarHeight: 40px;
  131. @navbarBackground: @bodyBackground;
  132. @navbarBackgroundHighlight: darken(@bodyBackground, 10%);
  133. @navbarBorder: @white;
  134. @navbarText: @gray;
  135. @navbarLinkColor: @gray;
  136. @navbarLinkColorHover: @grayDark;
  137. @navbarLinkColorActive: @gray;
  138. @navbarLinkBackgroundHover: darken(@bodyBackground, 5%);
  139. @navbarLinkBackgroundActive: @navbarBackground;
  140. @navbarBrandColor: @navbarLinkColor;
  141. // Inverted navbar
  142. @navbarInverseBackground: lighten(@linkColor, 10%);
  143. @navbarInverseHeight: 64px;
  144. @navbarInverseBackgroundHighlight: lighten(@navbarInverseBackground, 5%);
  145. @navbarInverseBorder: lighten(@navbarInverseBackground, 3%);
  146. @navbarInverseText: @white;
  147. @navbarInverseLinkColor: @white;
  148. @navbarInverseLinkColorHover: @white;
  149. @navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
  150. @navbarInverseLinkBackground: darken(@navbarInverseBackground, 10%);
  151. @navbarInverseLinkBackgroundHover: lighten(@navbarInverseBackground, 60%);
  152. @navbarInverseLinkBackgroundActive: @navbarInverseBackground;
  153. @navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
  154. @navbarInverseSearchBackgroundFocus: @white;
  155. @navbarInverseSearchBorder: @navbarInverseBackground;
  156. @navbarInverseSearchPlaceholderColor: #ccc;
  157. @navbarInverseBrandColor: @navbarInverseLinkColor;
  158. // Pagination
  159. // -------------------------
  160. @paginationBackground: #fff;
  161. @paginationBorder: #ddd;
  162. @paginationActiveBackground: #f5f5f5;
  163. // Hero unit
  164. // -------------------------
  165. @heroUnitBackground: @grayLighter;
  166. @heroUnitHeadingColor: inherit;
  167. @heroUnitLeadColor: inherit;
  168. // Form states and alerts
  169. // -------------------------
  170. @warningText: #c09853;
  171. @warningBackground: #fcf8e3;
  172. @warningBorder: darken(spin(@warningBackground, -10), 3%);
  173. @errorText: #b94a48;
  174. @errorBackground: #f2dede;
  175. @errorBorder: darken(spin(@errorBackground, -10), 3%);
  176. @successText: #468847;
  177. @successBackground: #dff0d8;
  178. @successBorder: darken(spin(@successBackground, -10), 5%);
  179. @infoText: #3a87ad;
  180. @infoBackground: #d9edf7;
  181. @infoBorder: darken(spin(@infoBackground, -10), 7%);
  182. // Tooltips and popovers
  183. // -------------------------
  184. @tooltipColor: #fff;
  185. @tooltipBackground: #000;
  186. @tooltipArrowWidth: 5px;
  187. @tooltipArrowColor: @tooltipBackground;
  188. @popoverBackground: #fff;
  189. @popoverArrowWidth: 10px;
  190. @popoverArrowColor: #fff;
  191. @popoverTitleBackground: darken(@popoverBackground, 3%);
  192. // Special enhancement for popovers
  193. @popoverArrowOuterWidth: @popoverArrowWidth + 1;
  194. @popoverArrowOuterColor: rgba(0,0,0,.25);
  195. // GRID
  196. // --------------------------------------------------
  197. // Default 940px grid
  198. // -------------------------
  199. @gridColumns: 12;
  200. @gridColumnWidth: 60px;
  201. @gridGutterWidth: 20px;
  202. @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
  203. // 1200px min
  204. @gridColumnWidth1200: 70px;
  205. @gridGutterWidth1200: 30px;
  206. @gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
  207. // 768px-979px
  208. @gridColumnWidth768: 42px;
  209. @gridGutterWidth768: 20px;
  210. @gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
  211. // Fluid grid
  212. // -------------------------
  213. @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
  214. @fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
  215. // 1200px min
  216. @fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
  217. @fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
  218. // 768px-979px
  219. @fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
  220. @fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);