variables.less 9.8 KB

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