_tab.scss.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-tab-Tab-css_mixin-extjs-tab'>/**
  19. </span> * Creates the base structure of a Tab.
  20. * @member Ext.tab.Tab
  21. */
  22. @mixin extjs-tab {
  23. @include x-frame(
  24. $cls: 'tab',
  25. $ui: 'default-top',
  26. $border-radius: $tab-top-border-radius,
  27. $border-width: $tab-top-border-width,
  28. $background-color: $tab-base-color,
  29. $background-gradient: $tab-background-gradient,
  30. $background-direction: top,
  31. $table: true
  32. );
  33. @include x-frame(
  34. $cls: 'tab',
  35. $ui: 'default-bottom',
  36. $border-radius: $tab-bottom-border-radius,
  37. $border-width: $tab-bottom-border-width,
  38. $background-color: $tab-base-color,
  39. $background-gradient: $tab-background-gradient,
  40. $background-direction: bottom,
  41. $table: true
  42. );
  43. .#{$prefix}tab {
  44. z-index: 1;
  45. margin: 0 0 0 $tab-spacing;
  46. display: inline-block;
  47. zoom: 1;
  48. *display: inline;
  49. white-space: nowrap;
  50. height: $tab-height;
  51. border-color: $tab-border-color;
  52. cursor: pointer;
  53. cursor: hand;
  54. button {
  55. cursor: pointer;
  56. cursor: hand;
  57. }
  58. em {
  59. display: block;
  60. padding: 0 6px;
  61. line-height: 1px;
  62. }
  63. button {
  64. background: none;
  65. border: 0;
  66. padding: 0;
  67. margin: 0;
  68. -webkit-appearance: none;
  69. font-size: $tab-font-size;
  70. @if $tab-font-weight {
  71. font-weight: $tab-font-weight;
  72. }
  73. @if $tab-font-family {
  74. font-family: $tab-font-family;
  75. }
  76. color: $tab-color;
  77. outline: 0 none;
  78. overflow-x: visible;
  79. &amp;::-moz-focus-inner {
  80. border: 0;
  81. padding: 0;
  82. }
  83. .#{$prefix}tab-inner {
  84. background-color: transparent;
  85. background-repeat: no-repeat;
  86. background-position: 0 -2px;
  87. display: block;
  88. text-align: center;
  89. white-space: nowrap;
  90. text-overflow: ellipsis;
  91. -o-text-overflow: ellipsis;
  92. overflow: hidden;
  93. }
  94. }
  95. img {
  96. display: none;
  97. }
  98. }
  99. .#{$prefix}border-box {
  100. .#{$prefix}tab-default-top {
  101. height: $tab-height + top($tabbar-top-strip-border-width);
  102. }
  103. .#{$prefix}tab-default-bottom {
  104. height: $tab-height + bottom($tabbar-bottom-strip-border-width);
  105. }
  106. }
  107. @if $include-ie {
  108. * html .#{$prefix}ie {
  109. .#{$prefix}tab button {
  110. width: 1px;
  111. }
  112. }
  113. .#{$prefix}strict .#{$prefix}ie6,
  114. .#{$prefix}strict .#{$prefix}ie7 {
  115. .#{$prefix}tab .#{$prefix}frame-mc {
  116. height: 100%;
  117. }
  118. }
  119. .#{$prefix}ie .#{$prefix}tab-active button:active {
  120. position: relative;
  121. top: -1px;
  122. left: -1px;
  123. }
  124. }
  125. $framepad: max(top($tab-top-border-radius), right($tab-top-border-radius)) - top($tab-top-border-width);
  126. .#{$prefix}tab-default-top {
  127. @if $tab-inner-border {
  128. @include inner-border(
  129. $width: $tab-top-inner-border-width,
  130. $color: $tab-inner-border-color
  131. );
  132. }
  133. border-bottom: 1px solid $tabbar-strip-border-color !important;
  134. em {
  135. padding-bottom: $framepad;
  136. }
  137. button,
  138. .#{$prefix}tab-inner {
  139. height: $tab-height - $framepad * 2 - top($tab-top-border-width);
  140. line-height: $tab-height - $framepad * 2 - top($tab-top-border-width);
  141. }
  142. }
  143. // corrects text being clipped at the bottom in safari4 &amp; 5.0.5
  144. .#{$prefix}safari4,
  145. .#{$prefix}safari5_0 {
  146. .#{$prefix}tab-default-top .#{$prefix}tab-inner {
  147. line-height: $tab-height - $framepad * 2 - top($tab-top-border-width) - 2;
  148. }
  149. }
  150. .#{$prefix}nbr .#{$prefix}tab-default-top {
  151. border-bottom-width: 1px !important;
  152. }
  153. .#{$prefix}tab-default-top-active {
  154. border-bottom-color: $tabbar-strip-background-color !important;
  155. }
  156. $framepad: max(bottom($tab-bottom-border-radius), left($tab-bottom-border-radius)) - bottom($tab-bottom-border-width);
  157. .#{$prefix}tab-default-bottom {
  158. @if $tab-inner-border {
  159. @include inner-border(
  160. $width: $tab-bottom-inner-border-width,
  161. $color: $tab-inner-border-color
  162. );
  163. }
  164. border-top: 1px solid $tabbar-strip-border-color !important;
  165. @include inner-border(
  166. $width: $tab-bottom-inner-border-width,
  167. $color: $tab-inner-border-color
  168. );
  169. em {
  170. padding-top: $framepad;
  171. }
  172. button,
  173. .#{$prefix}tab-inner {
  174. height: $tab-height - $framepad * 2 - bottom($tab-bottom-border-width);
  175. line-height: $tab-height - $framepad * 2 - bottom($tab-bottom-border-width);
  176. }
  177. }
  178. .#{$prefix}nbr .#{$prefix}tab-default-bottom {
  179. border-top-width: 1px !important;
  180. }
  181. .#{$prefix}tab-default-bottom-active {
  182. border-top-color: $tabbar-strip-background-color !important;
  183. }
  184. .#{$prefix}tab-default-disabled {
  185. cursor: default;
  186. border-color: $tab-border-color-disabled;
  187. @include background-gradient($tab-base-color-disabled, $tab-background-gradient-disabled);
  188. button {
  189. color: $tab-color-disabled !important;
  190. }
  191. }
  192. .#{$prefix}tab-icon-text-left {
  193. .#{$prefix}tab-inner {
  194. padding-left: 20px;
  195. }
  196. }
  197. .#{$prefix}tab button {
  198. position: relative;
  199. }
  200. .#{$prefix}tab-icon {
  201. position: absolute;
  202. background-repeat: no-repeat;
  203. background-position: 0 -1px;
  204. top: 0;
  205. left: 0;
  206. right: auto;
  207. bottom: 0;
  208. width: 18px;
  209. height: 18px;
  210. }
  211. // Stop icons being clipped by the bottom of the button element
  212. .#{$prefix}strict {
  213. .#{$prefix}ie8 .#{$prefix}tab button,
  214. .#{$prefix}ie9 .#{$prefix}tab button {
  215. overflow-y: visible;
  216. }
  217. }
  218. .#{$prefix}tab-default-disabled .#{$prefix}tab-icon {
  219. @include opacity(.5);
  220. }
  221. /* In IE a disabled icon needs to be hidden or the opacity effect covers some of the text */
  222. .#{$prefix}tab-noicon .#{$prefix}tab-icon {
  223. display: none;
  224. }
  225. //over
  226. .#{$prefix}tab-over {
  227. @if $tab-border-color-over != $tab-border-color {
  228. border-color: $tab-border-color-over;
  229. }
  230. button {
  231. @if $tab-color-over != $tab-color {
  232. color: $tab-color-over;
  233. }
  234. @if $tab-font-weight-over != $tab-font-weight {
  235. font-weight: $tab-font-weight-over;
  236. }
  237. @if $tab-font-size-over != $tab-font-size {
  238. font-size: $tab-font-size-over;
  239. }
  240. @if $tab-font-family-over != $tab-font-family {
  241. font-family: $tab-font-family-over;
  242. }
  243. }
  244. }
  245. .#{$prefix}tab-top-over {
  246. @include background-gradient($tab-base-color-over, $tab-background-gradient-over, top);
  247. }
  248. .#{$prefix}tab-bottom-over {
  249. @include background-gradient($tab-base-color-over, $tab-background-gradient-over, bottom);
  250. }
  251. //active
  252. .#{$prefix}tab-active {
  253. z-index: 3;
  254. @if $tab-border-color-active != $tab-border-color {
  255. border-color: $tab-border-color-active;
  256. }
  257. button {
  258. @if $tab-color-active != $tab-color {
  259. color: $tab-color-active;
  260. }
  261. @if $tab-font-weight-active != $tab-font-weight {
  262. font-weight: $tab-font-weight-active;
  263. }
  264. @if $tab-font-size-active != $tab-font-size {
  265. font-size: $tab-font-size-active;
  266. }
  267. @if $tab-font-family-active != $tab-font-family {
  268. font-family: $tab-font-family-active;
  269. }
  270. }
  271. }
  272. .#{$prefix}tab-top-active {
  273. @include background-gradient($tab-base-color-active, $tab-background-gradient-active, top);
  274. }
  275. .#{$prefix}tab-bottom-active {
  276. @include background-gradient($tab-base-color-active, $tab-background-gradient-active, bottom);
  277. }
  278. //disabled
  279. .#{$prefix}tab-disabled {
  280. @if $tab-border-color-disabled != $tab-border-color {
  281. border-color: $tab-border-color-disabled;
  282. }
  283. button {
  284. @if $tab-color-disabled != $tab-color {
  285. color: $tab-color-disabled;
  286. }
  287. @if $tab-font-weight-disabled != $tab-font-weight {
  288. font-weight: $tab-font-weight-disabled;
  289. }
  290. @if $tab-font-size-disabled != $tab-font-size {
  291. font-size: $tab-font-size-disabled;
  292. }
  293. @if $tab-font-family-disabled != $tab-font-family {
  294. font-family: $tab-font-family-disabled;
  295. }
  296. }
  297. }
  298. .#{$prefix}tab-top-disabled {
  299. background-image: none;
  300. background: transparent;
  301. @include background-gradient($tab-base-color-disabled, $tab-background-gradient-disabled, top);
  302. }
  303. .#{$prefix}tab-bottom-disabled {
  304. background-image: none;
  305. background: transparent;
  306. @include background-gradient($tab-base-color-disabled, $tab-background-gradient-disabled, bottom);
  307. }
  308. @if not $supports-gradients or $compile-all {
  309. .#{$prefix}nlg {
  310. @if $tab-background-gradient != null {
  311. .#{$prefix}tab-top { background-image: theme-background-image($theme-name, 'tab/tab-default-top-bg.gif'); }
  312. .#{$prefix}tab-bottom { background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-bg.gif'); }
  313. }
  314. @if $tab-background-gradient-over != null {
  315. .#{$prefix}tab-top-over { background-image: theme-background-image($theme-name, 'tab/tab-default-top-over-bg.gif'); }
  316. .#{$prefix}tab-bottom-over { background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-over-bg.gif'); }
  317. }
  318. @if $tab-background-gradient-active != null {
  319. .#{$prefix}tab-top-active { background-image: theme-background-image($theme-name, 'tab/tab-default-top-active-bg.gif'); }
  320. .#{$prefix}tab-bottom-active { background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-active-bg.gif'); }
  321. }
  322. @if $tab-background-gradient-disabled != null {
  323. .#{$prefix}tab-top-disabled { background-image: theme-background-image($theme-name, 'tab/tab-default-top-disabled-bg.gif') !important; }
  324. .#{$prefix}tab-bottom-disabled { background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-disabled-bg.gif') !important; }
  325. }
  326. }
  327. }
  328. .#{$prefix}tab-closable em {
  329. padding-right: $tab-closable-icon-width + 3;
  330. }
  331. .#{$prefix}tab-close-btn {
  332. position: absolute;
  333. top: $tab-closable-icon-top;
  334. right: $tab-closable-icon-right;
  335. width: $tab-closable-icon-width;
  336. height: $tab-closable-icon-height;
  337. font-size: 0;
  338. line-height: 0;
  339. text-indent: -999px;
  340. background: no-repeat;
  341. background-image: theme-background-image($theme-name, $tab-closable-icon);
  342. @include opacity(.6);
  343. }
  344. .#{$prefix}nbr .#{$prefix}tab-close-btn {
  345. top: $nbr-tab-closable-icon-top;
  346. right: $nbr-tab-closable-icon-right;
  347. }
  348. /* Include the element name otherwise Internet Explorer 7 &amp; 8 take a performance hit */
  349. a.#{$prefix}tab-close-btn:hover {
  350. @include opacity(1);
  351. }
  352. /* Include the element name to raise the specificity to equal the :hover */
  353. .#{$prefix}tab-default-disabled a.#{$prefix}tab-close-btn {
  354. @include opacity(0.3);
  355. }
  356. @if not $supports-border-radius or $compile-all {
  357. .#{$prefix}nbr {
  358. .#{$prefix}tab-top-over {
  359. .#{$prefix}frame-tl,
  360. .#{$prefix}frame-bl,
  361. .#{$prefix}frame-tr,
  362. .#{$prefix}frame-br,
  363. .#{$prefix}frame-tc,
  364. .#{$prefix}frame-bc {
  365. background-image: theme-background-image($theme-name, 'tab/tab-default-top-over-corners.gif');
  366. }
  367. .#{$prefix}frame-ml,
  368. .#{$prefix}frame-mr {
  369. background-image: theme-background-image($theme-name, 'tab/tab-default-top-over-sides.gif');
  370. }
  371. @if $tab-background-gradient-over != null {
  372. .#{$prefix}frame-mc {
  373. background-color: $tab-base-color-over;
  374. background-repeat: repeat-x;
  375. background-image: theme-background-image($theme-name, 'tab/tab-default-top-over-bg.gif');
  376. }
  377. }
  378. }
  379. .#{$prefix}tab-bottom-over {
  380. .#{$prefix}frame-tl,
  381. .#{$prefix}frame-bl,
  382. .#{$prefix}frame-tr,
  383. .#{$prefix}frame-br,
  384. .#{$prefix}frame-tc,
  385. .#{$prefix}frame-bc {
  386. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-over-corners.gif');
  387. }
  388. .#{$prefix}frame-ml,
  389. .#{$prefix}frame-mr {
  390. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-over-sides.gif');
  391. }
  392. @if $tab-background-gradient-over != null {
  393. .#{$prefix}frame-mc {
  394. background-color: $tab-base-color-over;
  395. background-repeat: repeat-x;
  396. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-over-bg.gif');
  397. }
  398. }
  399. }
  400. .#{$prefix}tab-top-active {
  401. .#{$prefix}frame-tl,
  402. .#{$prefix}frame-bl,
  403. .#{$prefix}frame-tr,
  404. .#{$prefix}frame-br,
  405. .#{$prefix}frame-tc,
  406. .#{$prefix}frame-bc {
  407. background-image: theme-background-image($theme-name, 'tab/tab-default-top-active-corners.gif');
  408. }
  409. .#{$prefix}frame-ml,
  410. .#{$prefix}frame-mr {
  411. background-image: theme-background-image($theme-name, 'tab/tab-default-top-active-sides.gif');
  412. }
  413. @if $tab-background-gradient-active != null {
  414. .#{$prefix}frame-mc {
  415. background-color: $tab-base-color-active;
  416. background-repeat: repeat-x;
  417. background-image: theme-background-image($theme-name, 'tab/tab-default-top-active-bg.gif');
  418. }
  419. }
  420. }
  421. .#{$prefix}tab-bottom-active {
  422. .#{$prefix}frame-tl,
  423. .#{$prefix}frame-bl,
  424. .#{$prefix}frame-tr,
  425. .#{$prefix}frame-br,
  426. .#{$prefix}frame-tc,
  427. .#{$prefix}frame-bc {
  428. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-active-corners.gif');
  429. }
  430. .#{$prefix}frame-ml,
  431. .#{$prefix}frame-mr {
  432. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-active-sides.gif');
  433. }
  434. @if $tab-background-gradient-active != null {
  435. .#{$prefix}frame-mc {
  436. background-color: $tab-base-color-active;
  437. background-repeat: repeat-x;
  438. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-active-bg.gif');
  439. }
  440. }
  441. }
  442. .#{$prefix}tab-top-disabled {
  443. .#{$prefix}frame-tl,
  444. .#{$prefix}frame-bl,
  445. .#{$prefix}frame-tr,
  446. .#{$prefix}frame-br,
  447. .#{$prefix}frame-tc,
  448. .#{$prefix}frame-bc {
  449. background-image: theme-background-image($theme-name, 'tab/tab-default-top-disabled-corners.gif');
  450. }
  451. .#{$prefix}frame-ml,
  452. .#{$prefix}frame-mr {
  453. background-image: theme-background-image($theme-name, 'tab/tab-default-top-disabled-sides.gif');
  454. }
  455. @if $tab-background-gradient-disabled != null {
  456. .#{$prefix}frame-mc {
  457. background-repeat: repeat-x;
  458. background-image: theme-background-image($theme-name, 'tab/tab-default-top-disabled-bg.gif');
  459. }
  460. }
  461. }
  462. .#{$prefix}tab-bottom-disabled {
  463. .#{$prefix}frame-tl,
  464. .#{$prefix}frame-bl,
  465. .#{$prefix}frame-tr,
  466. .#{$prefix}frame-br,
  467. .#{$prefix}frame-tc,
  468. .#{$prefix}frame-bc {
  469. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-disabled-corners.gif');
  470. }
  471. .#{$prefix}frame-ml,
  472. .#{$prefix}frame-mr {
  473. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-disabled-sides.gif');
  474. }
  475. @if $tab-background-gradient-disabled != null {
  476. .#{$prefix}frame-mc {
  477. background-repeat: repeat-x;
  478. background-image: theme-background-image($theme-name, 'tab/tab-default-bottom-disabled-bg.gif');
  479. }
  480. }
  481. }
  482. }
  483. }
  484. }
  485. </pre>
  486. </body>
  487. </html>