variables.less 9.9 KB

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