TabContainer.less 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. /* TabContainer
  2. *
  3. * Styling TabContainer means styling the TabList and Its content container (dijitTitlePane)
  4. *
  5. * Tab List: (including 4 kinds of tab location)
  6. * .dijitTabContainerTop-tabs - tablist container at top
  7. * .dijitTabContainerBottom-tabs - tablist container at bottom
  8. * .dijitTabContainerLeft-tabs - tablist container at left
  9. * .dijitTabContainerRight-tabs - tablist container at right
  10. *
  11. * Tab Strip Button:
  12. * .dijitTabStripIcon - tab strip button icon
  13. * .dijitTabStripMenuIcon - down arrow icon position
  14. * .dijitTabStripSlideLeftIcon - left arrow icon position
  15. * .dijitTabStripSlideRightIcon - right arrow icon position
  16. *
  17. * .tabStripButtonDisabled - styles for disabled tab strip buttons
  18. *
  19. * Tab Button:
  20. * .dijitTabContainerTop-tabs .dijitTab - styles for top tab button container
  21. * .dijitTabContainerBottom-tabs .dijitTab - styles for bottom tab button container
  22. * .dijitTabContainerLeft-tabs .dijitTab - styles for left tab button container
  23. * .dijitTabContainerRight-tabs .dijitTab - styles for right tab button container
  24. *
  25. * .dijitTabContainerTop-tabs .dijitTabChecked .dijitTab
  26. * - styles for selected status of top tab button
  27. * same to Bottom, Left, Right Tabs
  28. *
  29. * .dijitTabHover .dijitTab - styles when mouse hover on tab buttons
  30. * .dijitTabActive .dijitTab - styles when mouse down on tab buttons
  31. * .dijitTabChecked .dijitTab - styles when on buttons of selected tab
  32. *
  33. * .dijitTabCloseButton - the close action buttons lie at the right top of each tab button on closable tabs
  34. * .dijitTabCloseButtonHover - styles when mouse hover on close action button
  35. * .dijitTabCloseButtonActive - styles when mouse down on close action button
  36. *
  37. * Tab Button: (checked status)
  38. *
  39. * Tab Content Container:
  40. * .dijitTabContainerTop-dijitContentPane
  41. * .dijitTabContainerBottom-dijitContentPane
  42. * .dijitTabContainerLeft-dijitContentPane
  43. * .dijitTabContainerRight-dijitContentPane - for background and padding
  44. *
  45. * Nested Tabs:
  46. * .dijitTabContainerNested - Container for nested tabs
  47. * .dijitTabContainerTabListNested - tab list container for nested tabs
  48. */
  49. @import "../variables";
  50. .unselected-tab-gradient (@direction) {
  51. // white line, dark line, then fade from light to dark
  52. .alpha-white-gradient (@direction, 1,0px, 1,1px, 0.1,2px, 0.6,7px, 0,100%);
  53. }
  54. .topBottom-selected-tab-gradient (@direction) {
  55. .alpha-white-gradient (@direction, 1,0px, 1,1px, 0,2px, 1,7px); // white line, blue line, remainder white
  56. }
  57. /*** some common features ***/
  58. .claro .dijitTabPaneWrapper {
  59. background:@pane-background-color;
  60. }
  61. .claro .dijitTabPaneWrapper,
  62. .claro .dijitTabContainerTop-tabs,
  63. .claro .dijitTabContainerBottom-tabs,
  64. .claro .dijitTabContainerLeft-tabs,
  65. .claro .dijitTabContainerRight-tabs {
  66. /* todo: add common class name for this div */
  67. border-color: @border-color;
  68. }
  69. .claro .dijitTabCloseButton {
  70. background: url("../@{image-layout-tab-close}") no-repeat;
  71. width: 14px;
  72. height: 14px;
  73. margin-left: 5px;
  74. margin-right:-5px;
  75. }
  76. .claro .dijitTabCloseButtonHover {
  77. background-position:-14px;
  78. }
  79. .claro .dijitTabCloseButtonActive {
  80. background-position:-28px;
  81. }
  82. .claro .dijitTabSpacer {
  83. /* set the spacer invisible. note that height:0 doesn't work on IE/quirks, it's still 10px. */
  84. display: none;
  85. }
  86. .claro .dijitTab {
  87. border: 1px solid @border-color;
  88. background-color:@unselected-background-color;
  89. .transition-property(background-color, border);
  90. .transition-duration(.35s);
  91. color:@unselected-text-color;
  92. }
  93. .claro .dijitTabHover {
  94. border-color: @hovered-border-color;
  95. background-color:@hovered-background-color;
  96. .transition-duration(.25s);
  97. color:@hovered-text-color;
  98. }
  99. .claro .dijitTabActive {
  100. border-color: @pressed-border-color;
  101. background-color:@pressed-background-color;
  102. color:@selected-text-color;
  103. .transition-duration(.1s);
  104. }
  105. .claro .dijitTabChecked {
  106. // selected tab
  107. border-color: @border-color; // don't use @selected-border-color because need to match border of TabContainer
  108. background-color: @selected-background-color;
  109. color: @selected-text-color;
  110. }
  111. .claro .dijitTabDisabled {
  112. background-color: @tab-disabled-background-color;
  113. }
  114. .claro .tabStripButton {
  115. background-color: transparent;
  116. border: none;
  117. }
  118. /*** end common ***/
  119. /*************** top tab ***************/
  120. .claro .dijitTabContainerTop-tabs .dijitTab {
  121. /* unselected (and not hovered/pressed) tab */
  122. top: 1px; /* used for overlap */
  123. margin-right: 1px;
  124. padding:3px 6px;
  125. border-bottom-width: 0;
  126. min-width: 60px;
  127. text-align: center;
  128. // gradient (CSS gradient, with backup image for IE6-9)
  129. background-image: url("images/tabTopUnselected.png");
  130. background-repeat: repeat-x;
  131. .unselected-tab-gradient(top);
  132. .box-shadow(0 -1px 1px rgba(0, 0, 0, 0.04));
  133. }
  134. .claro .dijitTabContainerTop-tabs .dijitTabChecked {
  135. /* selected tab */
  136. padding-bottom: 4px;
  137. padding-top: 9px;
  138. // gradient (CSS gradient, with backup image for IE6-9)
  139. background-image: url("images/tabTopSelected.png");
  140. .topBottom-selected-tab-gradient (top);
  141. .box-shadow(0 -1px 2px rgba(0, 0, 0, 0.05));
  142. }
  143. /** end top tab **/
  144. /*************** bottom tab ***************/
  145. .claro .dijitTabContainerBottom-tabs .dijitTab {
  146. /* unselected (and not hovered/pressed) tab */
  147. top: -1px; /* used for overlap */
  148. margin-right: 1px;
  149. padding:3px 6px;
  150. border-top-width: 0;
  151. min-width: 60px;
  152. text-align: center;
  153. // gradient (CSS gradient, with backup image for IE6-9)
  154. background-image: url("images/tabBottomUnselected.png");
  155. background-repeat: repeat-x;
  156. background-position: bottom;
  157. .unselected-tab-gradient(bottom);
  158. .box-shadow(0 1px 1px rgba(0, 0, 0, 0.04));
  159. }
  160. /* selected tab */
  161. .claro .dijitTabContainerBottom-tabs .dijitTabChecked {
  162. padding-bottom: 9px;
  163. padding-top: 4px;
  164. // gradient (CSS gradient, with backup image for IE6-9)
  165. background-image: url("images/tabBottomSelected.png");
  166. .topBottom-selected-tab-gradient (bottom);
  167. .box-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
  168. }
  169. /** end bottom tab **/
  170. /*************** left tab ***************/
  171. .claro .dijitTabContainerLeft-tabs .dijitTab {
  172. /* unselected (and not hovered/pressed) tab */
  173. left: 1px; /* used for overlap */
  174. margin-bottom: 1px;
  175. padding:3px 8px 4px 4px;
  176. // gradient (CSS gradient, with backup image for IE6-9)
  177. background-image: url("images/tabLeftUnselected.png");
  178. background-repeat: repeat-y;
  179. .unselected-tab-gradient(left);
  180. }
  181. /* selected tab */
  182. .claro .dijitTabContainerLeft-tabs .dijitTabChecked {
  183. border-right-width: 0;
  184. padding-right: 9px;
  185. // gradient (CSS gradient, with backup image for IE6-9)
  186. background-image: url("images/tabLeftSelected.png");
  187. .alpha-white-gradient (left, 0.5,0px, 1,30px); // 1/2 inch blue gradient, remainder white
  188. .box-shadow(-1px 0 2px rgba(0, 0, 0, .05));
  189. }
  190. /** end left tab **/
  191. /*************** right tab ***************/
  192. .claro .dijitTabContainerRight-tabs .dijitTab {
  193. /* unselected (and not hovered/pressed) tab */
  194. left: -1px; /* used for overlap */
  195. margin-bottom: 1px;
  196. padding:3px 8px 4px 4px;
  197. // gradient (CSS gradient, with backup image for IE6-9)
  198. background-image: url("images/tabRightUnselected.png");
  199. background-repeat: repeat-y;
  200. background-position: right;
  201. .unselected-tab-gradient(right);
  202. }
  203. .claro .dijitTabContainerRight-tabs .dijitTabChecked {
  204. /* selected tab */
  205. padding-left: 5px;
  206. border-left-width: 0;
  207. // gradient (CSS gradient, with backup image for IE6-9)
  208. background-image: url("images/tabRightSelected.png");
  209. .alpha-white-gradient (right, 0.5,0px, 1,30px); // 1/2 inch blue gradient, remainder white
  210. .box-shadow(1px 0 2px rgba(0, 0, 0, 0.07));
  211. }
  212. /** end right tab **/
  213. /** round corner **/
  214. .claro .dijitTabContainerTop-tabs .dijitTab {
  215. .border-radius(2px 2px 0 0);
  216. }
  217. .claro .dijitTabContainerBottom-tabs .dijitTab {
  218. .border-radius(0 0 2px 2px);
  219. }
  220. .claro .dijitTabContainerLeft-tabs .dijitTab {
  221. .border-radius(2px 0 0 2px);
  222. }
  223. .claro .dijitTabContainerRight-tabs .dijitTab {
  224. .border-radius(0 2px 2px 0);
  225. }
  226. /************ left/right scroll buttons + menu button ************/
  227. .claro .tabStripButton {
  228. background-color:@button-background-color;
  229. border: 1px solid @border-color;
  230. }
  231. .claro .dijitTabListContainer-top .tabStripButton {
  232. padding: 4px 3px;
  233. margin-top:7px;
  234. .alpha-white-gradient (top, 1,0px, 0.1,1px, 0.6,6px, 0,100%); // to match unselected tab, but had to tweak numbers
  235. }
  236. .claro .dijitTabListContainer-bottom .tabStripButton {
  237. padding:4px 3px;
  238. margin-bottom:7px;
  239. .alpha-white-gradient (bottom, 1,0px, 0.1,1px, 0.6,6px, 0,100%); // to match unselected tab, but had to tweak numbers
  240. }
  241. .claro .tabStripButtonHover {
  242. background-color:@hovered-background-color;
  243. }
  244. .claro .tabStripButtonActive {
  245. background-color:@pressed-background-color;
  246. }
  247. .claro .dijitTabStripIcon {
  248. height:15px;
  249. width:15px;
  250. margin: 0 auto;
  251. background:url("../@{image-form-button-arrows}") no-repeat -75px 50%;
  252. background-color: transparent;
  253. }
  254. .claro .dijitTabStripSlideRightIcon{
  255. background-position: -24px 50%;
  256. }
  257. .claro .dijitTabStripMenuIcon {
  258. background-position: -51px 50%;
  259. }
  260. /*disabled styles for tab strip buttons*/
  261. .claro .dijitTabListContainer-top .tabStripButtonDisabled,
  262. .claro .dijitTabListContainer-bottom .tabStripButtonDisabled {
  263. background-color:@tab-disabled-background-color;
  264. border:1px solid @border-color; /* to match border of TabContainer itself */
  265. }
  266. .claro .tabStripButtonDisabled .dijitTabStripSlideLeftIcon {
  267. background-position:-175px 50%;
  268. }
  269. .claro .tabStripButtonDisabled .dijitTabStripSlideRightIcon {
  270. background-position: -124px 50%;
  271. }
  272. .claro .tabStripButtonDisabled .dijitTabStripMenuIcon {
  273. background-position: -151px 50%;
  274. }
  275. /* Nested Tabs */
  276. .claro .dijitTabContainerNested .dijitTabListWrapper {
  277. height: auto;
  278. }
  279. .claro .dijitTabContainerNested .dijitTabContainerTop-tabs {
  280. border-bottom:solid 1px @border-color;
  281. padding:2px 2px 4px;
  282. }
  283. .claro .dijitTabContainerTabListNested .dijitTab {
  284. background:rgba(255, 255, 255, 0) none repeat scroll 0 0;
  285. border: none;
  286. padding: 4px;
  287. border-color: rgba(118,157,192,0);
  288. .transition-property(background-color, border-color);
  289. .transition-duration(.3s);
  290. .border-radius(2px);
  291. }
  292. .claro .dijitTabContainerTabListNested .dijitTab {
  293. background: none;
  294. border: none;
  295. top: 0;/* to override top: 1px/-1px for normal tabs */
  296. .box-shadow(none);
  297. }
  298. .claro .dijitTabContainerTabListNested .dijitTabHover {
  299. background-color: @nestedtab-hovered-background-color;
  300. border:solid 1px @nestedtab-hovered-border-color;
  301. padding: 3px; // 4px above padding - 1px compensation for border
  302. .transition-duration(.2s);
  303. }
  304. .claro .dijitTabContainerTabListNested .dijitTabHover .tabLabel {
  305. text-decoration: none;
  306. }
  307. .claro .dijitTabContainerTabListNested .dijitTabActive {
  308. border:solid 1px @nestedtab-selected-border-color;
  309. padding: 3px;
  310. // CSS gradient with fallback to image for IE
  311. // this is in a weird place, only for active state; mailed Jason about it
  312. background: @nestedtab-selected-background-color url("images/tabNested.png") repeat-x;
  313. .alpha-white-gradient (0.61,0%, 0,17%, 0,83%, 0.61,100%);
  314. .transition-duration(.1s);
  315. }
  316. .claro .dijitTabContainerTabListNested .dijitTabChecked {
  317. padding: 3px;
  318. border:solid 1px @selected-border-color;
  319. background-color:@selected-background-color;
  320. }
  321. .claro .dijitTabContainerTabListNested .dijitTabChecked .tabLabel {
  322. text-decoration: none;
  323. background-image:none;
  324. }
  325. .claro .dijitTabPaneWrapperNested {
  326. border: none;/* prevent double border */
  327. }
  328. .claro .dijitTab,
  329. .claro .tabStripButton {
  330. // IE6 can't handle background-image and background-color on same node
  331. _background-image: none !important;
  332. }