variables.less 11 KB

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