_button.scss 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. /**
  2. * Creates the base structure of an Ext.Button
  3. * @member Ext.button.Button
  4. */
  5. @mixin extjs-button {
  6. .#{$prefix}btn {
  7. display: inline-block;
  8. zoom: 1;
  9. *display: inline;
  10. position: relative;
  11. cursor: pointer;
  12. cursor: hand;
  13. white-space: nowrap;
  14. vertical-align: middle;
  15. * {
  16. cursor: pointer;
  17. cursor: hand;
  18. }
  19. background-repeat: no-repeat;
  20. em {
  21. background-repeat: no-repeat;
  22. // Styles for an anchor button.
  23. a {
  24. text-decoration: none;
  25. display: block;
  26. color: inherit;
  27. // 100% rather than auto for consistency with the button element
  28. width: 100%;
  29. // This is needed for IE7 in strict mode to ensure that the icon element has the correct opacity on a
  30. // disabled link button. It seems only to be needed for buttons that are narrower than their icon
  31. // element
  32. zoom: 1;
  33. }
  34. }
  35. button {
  36. // 100% rather than auto so that IE7 renders file upload and date picker buttons correctly
  37. width: 100%;
  38. display: block;
  39. margin: 0;
  40. padding: 0;
  41. border: 0;
  42. background: none;
  43. outline: 0 none;
  44. overflow: hidden;
  45. vertical-align: bottom;
  46. -webkit-appearance: none;
  47. &::-moz-focus-inner {
  48. border: 0;
  49. padding: 0;
  50. }
  51. }
  52. .#{$prefix}btn-inner {
  53. display: block;
  54. white-space: nowrap;
  55. background-color: transparent;
  56. background-repeat: no-repeat;
  57. background-position: left center;
  58. overflow: hidden;
  59. }
  60. .#{$prefix}btn-left .#{$prefix}btn-inner {
  61. text-align: left;
  62. }
  63. .#{$prefix}btn-center .#{$prefix}btn-inner {
  64. text-align: center;
  65. }
  66. .#{$prefix}btn-right .#{$prefix}btn-inner {
  67. text-align: right;
  68. }
  69. }
  70. .#{$prefix}btn-disabled span {
  71. @include opacity(.5);
  72. .#{$prefix}ie6 &,
  73. .#{$prefix}ie7 & {
  74. filter:none;
  75. }
  76. }
  77. //remove the opacity rule of IE8
  78. .#{$prefix}ie7 .#{$prefix}btn-disabled,
  79. .#{$prefix}ie8 .#{$prefix}btn-disabled {
  80. filter:none;
  81. }
  82. .#{$prefix}ie6 .#{$prefix}btn-disabled,
  83. .#{$prefix}ie7 .#{$prefix}btn-disabled,
  84. .#{$prefix}ie8 .#{$prefix}btn-disabled {
  85. .#{$prefix}btn-icon {
  86. @include opacity(.6);
  87. }
  88. }
  89. @if $include-ie {
  90. /* IE9 shows scrollbars in a button unless this is set */
  91. .#{$prefix}ie9 .#{$prefix}btn button {
  92. overflow: visible!important;
  93. }
  94. * html .#{$prefix}ie {
  95. .#{$prefix}btn button {
  96. width: 1px;
  97. }
  98. }
  99. .#{$prefix}ie .#{$prefix}btn button {
  100. overflow-x: visible; /*prevents extra horiz space in IE*/
  101. vertical-align: baseline; /*IE doesn't like bottom*/
  102. }
  103. .#{$prefix}strict .#{$prefix}ie6,
  104. .#{$prefix}strict .#{$prefix}ie7 {
  105. .#{$prefix}btn .#{$prefix}frame-mc {
  106. height: 100%;
  107. }
  108. }
  109. }
  110. @if not $supports-border-radius or $compile-all {
  111. /* Keep the selector simple ".x-btn .x-frame-mc" is enough to target the center frame of the button table */
  112. .#{$prefix}btn {
  113. .#{$prefix}frame-mc {
  114. vertical-align: middle;
  115. white-space: nowrap;
  116. cursor: pointer;
  117. }
  118. }
  119. /* Only center when all there is is text. Otherwise solo icons get centered. */
  120. .#{$prefix}btn-noicon {
  121. .#{$prefix}frame-mc {
  122. text-align: center;
  123. }
  124. }
  125. }
  126. .#{$prefix}btn-icon-text-left .#{$prefix}btn-icon {
  127. background-position: left center;
  128. }
  129. .#{$prefix}btn-icon-text-right .#{$prefix}btn-icon {
  130. background-position: right center;
  131. }
  132. .#{$prefix}btn-icon-text-top .#{$prefix}btn-icon {
  133. background-position: center top;
  134. }
  135. .#{$prefix}btn-icon-text-bottom .#{$prefix}btn-icon {
  136. background-position: center bottom;
  137. }
  138. .#{$prefix}btn {
  139. button, a {
  140. position: relative;
  141. .#{$prefix}btn-icon {
  142. position: absolute;
  143. background-repeat: no-repeat;
  144. }
  145. }
  146. }
  147. .#{$prefix}btn-arrow-right {
  148. background: transparent no-repeat right center;
  149. padding-right: $button-arrow-size;
  150. .#{$prefix}btn-inner {
  151. padding-right: 0 !important;
  152. }
  153. }
  154. .#{$prefix}toolbar .#{$prefix}btn-arrow-right {
  155. padding-right: $button-toolbar-arrow-size;
  156. }
  157. .#{$prefix}btn-arrow-bottom {
  158. background: transparent no-repeat center bottom;
  159. padding-bottom: $button-arrow-size;
  160. }
  161. .#{$prefix}btn-arrow {
  162. background-image: theme-background-image($theme-name, 'button/arrow.gif');
  163. display: block;
  164. }
  165. //split buttons
  166. .#{$prefix}btn-split-right,
  167. .#{$prefix}btn-over .#{$prefix}btn-split-right {
  168. background: transparent no-repeat right center;
  169. background-image: theme-background-image($theme-name, 'button/s-arrow.gif');
  170. padding-right: $button-split-size !important;
  171. }
  172. .#{$prefix}btn-split-bottom,
  173. .#{$prefix}btn-over .#{$prefix}btn-split-bottom {
  174. background: transparent no-repeat center bottom;
  175. background-image: theme-background-image($theme-name, 'button/s-arrow-b.gif');
  176. padding-bottom: $button-split-size;
  177. }
  178. .#{$prefix}toolbar .#{$prefix}btn-split-right {
  179. background-image: theme-background-image($theme-name, 'button/s-arrow-noline.gif');
  180. padding-right: $button-toolbar-split-size !important;
  181. }
  182. .#{$prefix}toolbar .#{$prefix}btn-split-bottom {
  183. background-image: theme-background-image($theme-name, 'button/s-arrow-b-noline.gif');
  184. }
  185. .#{$prefix}btn-split {
  186. display: block;
  187. }
  188. .#{$prefix}item-disabled,
  189. .#{$prefix}item-disabled * {
  190. cursor: default;
  191. }
  192. .#{$prefix}cycle-fixed-width .#{$prefix}btn-inner {
  193. text-align: inherit;
  194. }
  195. .#{$prefix}btn-over .#{$prefix}btn-split-right { background-image: theme-background-image($theme-name, 'button/s-arrow-o.gif'); }
  196. .#{$prefix}btn-over .#{$prefix}btn-split-bottom { background-image: theme-background-image($theme-name, 'button/s-arrow-bo.gif'); }
  197. @include extjs-button-ui(
  198. /* UI + Scale */
  199. 'default-small',
  200. $button-small-border-radius,
  201. $button-small-border-width,
  202. $button-default-border-color,
  203. $button-default-border-color-over,
  204. $button-default-border-color-focus,
  205. $button-default-border-color-pressed,
  206. $button-default-border-color-disabled,
  207. $button-small-padding,
  208. $button-small-text-padding,
  209. $button-default-background-color,
  210. $button-default-background-color-over,
  211. $button-default-background-color-focus,
  212. $button-default-background-color-pressed,
  213. $button-default-background-color-disabled,
  214. $button-default-background-gradient,
  215. $button-default-background-gradient-over,
  216. $button-default-background-gradient-focus,
  217. $button-default-background-gradient-pressed,
  218. $button-default-background-gradient-disabled,
  219. $button-default-color,
  220. $button-default-color-over,
  221. $button-default-color-focus,
  222. $button-default-color-pressed,
  223. $button-default-color-disabled,
  224. $button-small-font-size,
  225. $button-small-font-size-over,
  226. $button-small-font-size-focus,
  227. $button-small-font-size-pressed,
  228. $button-small-font-size-disabled,
  229. $button-small-font-weight,
  230. $button-small-font-weight-over,
  231. $button-small-font-weight-focus,
  232. $button-small-font-weight-pressed,
  233. $button-small-font-weight-disabled,
  234. $button-small-font-family,
  235. $button-small-font-family-over,
  236. $button-small-font-family-focus,
  237. $button-small-font-family-pressed,
  238. $button-small-font-family-disabled,
  239. $button-small-icon-size
  240. );
  241. @include extjs-button-ui(
  242. 'default-medium',
  243. $button-medium-border-radius,
  244. $button-medium-border-width,
  245. $button-default-border-color,
  246. $button-default-border-color-over,
  247. $button-default-border-color-focus,
  248. $button-default-border-color-pressed,
  249. $button-default-border-color-disabled,
  250. $button-medium-padding,
  251. $button-medium-text-padding,
  252. $button-default-background-color,
  253. $button-default-background-color-over,
  254. $button-default-background-color-focus,
  255. $button-default-background-color-pressed,
  256. $button-default-background-color-disabled,
  257. $button-default-background-gradient,
  258. $button-default-background-gradient-over,
  259. $button-default-background-gradient-focus,
  260. $button-default-background-gradient-pressed,
  261. $button-default-background-gradient-disabled,
  262. $button-default-color,
  263. $button-default-color-over,
  264. $button-default-color-focus,
  265. $button-default-color-pressed,
  266. $button-default-color-disabled,
  267. $button-medium-font-size,
  268. $button-medium-font-size-over,
  269. $button-medium-font-size-focus,
  270. $button-medium-font-size-pressed,
  271. $button-medium-font-size-disabled,
  272. $button-medium-font-weight,
  273. $button-medium-font-weight-over,
  274. $button-medium-font-weight-focus,
  275. $button-medium-font-weight-pressed,
  276. $button-medium-font-weight-disabled,
  277. $button-medium-font-family,
  278. $button-medium-font-family-over,
  279. $button-medium-font-family-focus,
  280. $button-medium-font-family-pressed,
  281. $button-medium-font-family-disabled,
  282. $button-medium-icon-size
  283. );
  284. @include extjs-button-ui(
  285. 'default-large',
  286. $button-large-border-radius,
  287. $button-large-border-width,
  288. $button-default-border-color,
  289. $button-default-border-color-over,
  290. $button-default-border-color-focus,
  291. $button-default-border-color-pressed,
  292. $button-default-border-color-disabled,
  293. $button-large-padding,
  294. $button-large-text-padding,
  295. $button-default-background-color,
  296. $button-default-background-color-over,
  297. $button-default-background-color-focus,
  298. $button-default-background-color-pressed,
  299. $button-default-background-color-disabled,
  300. $button-default-background-gradient,
  301. $button-default-background-gradient-over,
  302. $button-default-background-gradient-focus,
  303. $button-default-background-gradient-pressed,
  304. $button-default-background-gradient-disabled,
  305. $button-default-color,
  306. $button-default-color-over,
  307. $button-default-color-focus,
  308. $button-default-color-pressed,
  309. $button-default-color-disabled,
  310. $button-large-font-size,
  311. $button-large-font-size-over,
  312. $button-large-font-size-focus,
  313. $button-large-font-size-pressed,
  314. $button-large-font-size-disabled,
  315. $button-large-font-weight,
  316. $button-large-font-weight-over,
  317. $button-large-font-weight-focus,
  318. $button-large-font-weight-pressed,
  319. $button-large-font-weight-disabled,
  320. $button-large-font-family,
  321. $button-large-font-family-over,
  322. $button-large-font-family-focus,
  323. $button-large-font-family-pressed,
  324. $button-large-font-family-disabled,
  325. $button-large-icon-size
  326. );
  327. @include extjs-button-ui(
  328. 'default-toolbar-small',
  329. $button-small-border-radius,
  330. $button-small-border-width,
  331. $button-toolbar-border-color,
  332. $button-toolbar-border-color-over,
  333. $button-toolbar-border-color-focus,
  334. $button-toolbar-border-color-pressed,
  335. $button-toolbar-border-color-disabled,
  336. $button-small-padding,
  337. $button-small-text-padding,
  338. $button-toolbar-background-color,
  339. $button-toolbar-background-color-over,
  340. $button-toolbar-background-color-focus,
  341. $button-toolbar-background-color-pressed,
  342. $button-toolbar-background-color-disabled,
  343. $button-toolbar-background-gradient,
  344. $button-toolbar-background-gradient-over,
  345. $button-toolbar-background-gradient-focus,
  346. $button-toolbar-background-gradient-pressed,
  347. $button-toolbar-background-gradient-disabled,
  348. $button-toolbar-color,
  349. $button-toolbar-color-over,
  350. $button-toolbar-color-focus,
  351. $button-toolbar-color-pressed,
  352. $button-toolbar-color-disabled,
  353. $button-small-font-size,
  354. $button-small-font-size-over,
  355. $button-small-font-size-focus,
  356. $button-small-font-size-pressed,
  357. $button-small-font-size-disabled,
  358. $button-small-font-weight,
  359. $button-small-font-weight-over,
  360. $button-small-font-weight-focus,
  361. $button-small-font-weight-pressed,
  362. $button-small-font-weight-disabled,
  363. $button-small-font-family,
  364. $button-small-font-family-over,
  365. $button-small-font-family-focus,
  366. $button-small-font-family-pressed,
  367. $button-small-font-family-disabled,
  368. $button-small-icon-size
  369. );
  370. @include extjs-button-ui(
  371. 'default-toolbar-medium',
  372. $button-medium-border-radius,
  373. $button-medium-border-width,
  374. $button-toolbar-border-color,
  375. $button-toolbar-border-color-over,
  376. $button-toolbar-border-color-focus,
  377. $button-toolbar-border-color-pressed,
  378. $button-toolbar-border-color-disabled,
  379. $button-medium-padding,
  380. $button-medium-text-padding,
  381. $button-toolbar-background-color,
  382. $button-toolbar-background-color-over,
  383. $button-toolbar-background-color-focus,
  384. $button-toolbar-background-color-pressed,
  385. $button-toolbar-background-color-disabled,
  386. $button-toolbar-background-gradient,
  387. $button-toolbar-background-gradient-over,
  388. $button-toolbar-background-gradient-focus,
  389. $button-toolbar-background-gradient-pressed,
  390. $button-toolbar-background-gradient-disabled,
  391. $button-toolbar-color,
  392. $button-toolbar-color-over,
  393. $button-toolbar-color-focus,
  394. $button-toolbar-color-pressed,
  395. $button-toolbar-color-disabled,
  396. $button-medium-font-size,
  397. $button-medium-font-size-over,
  398. $button-medium-font-size-focus,
  399. $button-medium-font-size-pressed,
  400. $button-medium-font-size-disabled,
  401. $button-medium-font-weight,
  402. $button-medium-font-weight-over,
  403. $button-medium-font-weight-focus,
  404. $button-medium-font-weight-pressed,
  405. $button-medium-font-weight-disabled,
  406. $button-medium-font-family,
  407. $button-medium-font-family-over,
  408. $button-medium-font-family-focus,
  409. $button-medium-font-family-pressed,
  410. $button-medium-font-family-disabled,
  411. $button-medium-icon-size
  412. );
  413. @include extjs-button-ui(
  414. 'default-toolbar-large',
  415. $button-large-border-radius,
  416. $button-large-border-width,
  417. $button-toolbar-border-color,
  418. $button-toolbar-border-color-over,
  419. $button-toolbar-border-color-focus,
  420. $button-toolbar-border-color-pressed,
  421. $button-toolbar-border-color-disabled,
  422. $button-large-padding,
  423. $button-large-text-padding,
  424. $button-toolbar-background-color,
  425. $button-toolbar-background-color-over,
  426. $button-toolbar-background-color-focus,
  427. $button-toolbar-background-color-pressed,
  428. $button-toolbar-background-color-disabled,
  429. $button-toolbar-background-gradient,
  430. $button-toolbar-background-gradient-over,
  431. $button-toolbar-background-gradient-focus,
  432. $button-toolbar-background-gradient-pressed,
  433. $button-toolbar-background-gradient-disabled,
  434. $button-toolbar-color,
  435. $button-toolbar-color-over,
  436. $button-toolbar-color-focus,
  437. $button-toolbar-color-pressed,
  438. $button-toolbar-color-disabled,
  439. $button-large-font-size,
  440. $button-large-font-size-over,
  441. $button-large-font-size-focus,
  442. $button-large-font-size-pressed,
  443. $button-large-font-size-disabled,
  444. $button-large-font-weight,
  445. $button-large-font-weight-over,
  446. $button-large-font-weight-focus,
  447. $button-large-font-weight-pressed,
  448. $button-large-font-weight-disabled,
  449. $button-large-font-family,
  450. $button-large-font-family-over,
  451. $button-large-font-family-focus,
  452. $button-large-font-family-pressed,
  453. $button-large-font-family-disabled,
  454. $button-large-icon-size
  455. );
  456. .#{$prefix}btn-default-toolbar-small-disabled,
  457. .#{$prefix}btn-default-toolbar-medium-disabled,
  458. .#{$prefix}btn-default-toolbar-large-disabled {
  459. border-color: transparent;
  460. background-image: none;
  461. background: transparent;
  462. }
  463. }
  464. /**
  465. * Creates a visual theme of an Ext.Button
  466. * @member Ext.button.Button
  467. */
  468. @mixin extjs-button-ui(
  469. $ui,
  470. $border-radius: 0px,
  471. $border-width: 0px,
  472. $border-color: null,
  473. $border-color-over: null,
  474. $border-color-focus: null,
  475. $border-color-pressed: null,
  476. $border-color-disabled: null,
  477. $padding: null,
  478. $text-padding: null,
  479. $background-color: null,
  480. $background-color-over: null,
  481. $background-color-focus: null,
  482. $background-color-pressed: null,
  483. $background-color-disabled: null,
  484. $background-gradient: null,
  485. $background-gradient-over: null,
  486. $background-gradient-focus: null,
  487. $background-gradient-pressed: null,
  488. $background-gradient-disabled: null,
  489. $color: null,
  490. $color-over: null,
  491. $color-focus: null,
  492. $color-pressed: null,
  493. $color-disabled: null,
  494. $font-size: null,
  495. $font-size-over: null,
  496. $font-size-focus: null,
  497. $font-size-pressed: null,
  498. $font-size-disabled: null,
  499. $font-weight: null,
  500. $font-weight-over: null,
  501. $font-weight-focus: null,
  502. $font-weight-pressed: null,
  503. $font-weight-disabled: null,
  504. $font-family: null,
  505. $font-family-over: null,
  506. $font-family-focus: null,
  507. $font-family-pressed: null,
  508. $font-family-disabled: null,
  509. $icon-size: null
  510. ) {
  511. .#{$prefix}btn-#{$ui} {
  512. border-color: $border-color;
  513. }
  514. @include x-frame('btn', $ui, $border-radius, $border-width, $padding, $background-color, $background-gradient, true);
  515. .#{$prefix}btn-#{$ui} .#{$prefix}btn-inner {
  516. font-size: $font-size;
  517. font-weight: $font-weight;
  518. font-family: $font-family;
  519. color: $color;
  520. background-repeat: no-repeat;
  521. padding: 0 $text-padding;
  522. }
  523. .#{$prefix}btn-#{$ui}-icon,
  524. .#{$prefix}btn-#{$ui}-noicon {
  525. button,
  526. a,
  527. .#{$prefix}btn-inner {
  528. height: $icon-size;
  529. line-height: $icon-size;
  530. }
  531. }
  532. //icons
  533. .#{$prefix}btn-#{$ui}-icon {
  534. button,
  535. a {
  536. padding: 0;
  537. }
  538. .#{$prefix}btn-inner {
  539. /* even though there is no text we set a width and padding as buttons shrink-wrap around this element */
  540. width: $icon-size;
  541. padding: 0;
  542. }
  543. .#{$prefix}btn-icon {
  544. width: $icon-size;
  545. height: $icon-size;
  546. top: 0;
  547. left: 0;
  548. bottom: 0;
  549. right: 0;
  550. }
  551. }
  552. .#{$prefix}btn-#{$ui}-icon-text-left {
  553. button,
  554. a {
  555. height: $icon-size;
  556. }
  557. .#{$prefix}btn-inner {
  558. height: $icon-size;
  559. line-height: $icon-size;
  560. padding-left: $icon-size + 4px;
  561. }
  562. .#{$prefix}btn-icon {
  563. width: $icon-size;
  564. height: auto;
  565. top: 0;
  566. left: 0;
  567. bottom: 0;
  568. right: auto;
  569. .#{$prefix}ie6 &,
  570. .#{$prefix}quirks & {
  571. height: $icon-size;
  572. }
  573. }
  574. }
  575. .#{$prefix}btn-#{$ui}-icon-text-right {
  576. button,
  577. a {
  578. height: $icon-size;
  579. }
  580. .#{$prefix}btn-inner {
  581. height: $icon-size;
  582. line-height: $icon-size;
  583. padding-right: $icon-size + 4px !important;
  584. }
  585. .#{$prefix}btn-icon {
  586. width: $icon-size;
  587. height: auto;
  588. top: 0;
  589. left: auto;
  590. bottom: 0;
  591. right: 0;
  592. .#{$prefix}ie6 &,
  593. .#{$prefix}quirks & {
  594. height: $icon-size;
  595. }
  596. }
  597. }
  598. .#{$prefix}btn-#{$ui}-icon-text-top {
  599. .#{$prefix}btn-inner {
  600. padding-top: $icon-size + 4px;
  601. }
  602. .#{$prefix}btn-icon {
  603. width: auto;
  604. height: $icon-size;
  605. top: 0;
  606. left: 0;
  607. bottom: auto;
  608. right: 0;
  609. .#{$prefix}ie6 &,
  610. .#{$prefix}quirks .#{$prefix}ie & {
  611. width: $icon-size;
  612. }
  613. }
  614. }
  615. .#{$prefix}btn-#{$ui}-icon-text-bottom {
  616. .#{$prefix}btn-inner {
  617. padding-bottom: $icon-size + 4px;
  618. }
  619. .#{$prefix}btn-icon {
  620. width: auto;
  621. height: $icon-size;
  622. top: auto;
  623. left: 0;
  624. bottom: 0;
  625. right: 0;
  626. .#{$prefix}ie6 &,
  627. .#{$prefix}quirks .#{$prefix}ie & {
  628. width: $icon-size;
  629. }
  630. }
  631. }
  632. .#{$prefix}btn-#{$ui}-over {
  633. @if $border-color-over != $border-color {
  634. border-color: $border-color-over;
  635. }
  636. @if $background-color-over != null {
  637. @include background-gradient($background-color-over, $background-gradient-over);
  638. }
  639. .#{$prefix}btn-inner {
  640. @if $color-over != $color {
  641. color: $color-over;
  642. }
  643. @if $font-weight-over != $font-weight {
  644. font-weight: $font-weight-over;
  645. }
  646. @if $font-size-over != $font-size {
  647. font-size: $font-size-over;
  648. }
  649. @if $font-family-over != $font-family {
  650. font-family: $font-family-over;
  651. }
  652. }
  653. }
  654. .#{$prefix}btn-#{$ui}-focus {
  655. @if $border-color-focus != $border-color {
  656. border-color: $border-color-focus;
  657. }
  658. @if $background-color-focus != null {
  659. @include background-gradient($background-color-focus, $background-gradient-focus);
  660. }
  661. .#{$prefix}btn-inner {
  662. @if $color-focus != $color {
  663. color: $color-focus;
  664. }
  665. @if $font-weight-focus != $font-weight {
  666. font-weight: $font-weight-focus;
  667. }
  668. @if $font-size-focus != $font-size {
  669. font-size: $font-size-focus;
  670. }
  671. @if $font-family-focus != $font-family {
  672. font-family: $font-family-focus;
  673. }
  674. }
  675. }
  676. .#{$prefix}btn-#{$ui}-menu-active,
  677. .#{$prefix}btn-#{$ui}-pressed {
  678. @if $border-color-pressed != $border-color {
  679. border-color: $border-color-pressed;
  680. }
  681. @if $background-color-pressed != null {
  682. @include background-gradient($background-color-pressed, $background-gradient-pressed);
  683. }
  684. .#{$prefix}btn-inner {
  685. @if $color-pressed != $color {
  686. color: $color-pressed;
  687. }
  688. @if $font-weight-pressed != $font-weight {
  689. font-weight: $font-weight-pressed;
  690. }
  691. @if $font-size-pressed != $font-size {
  692. font-size: $font-size-pressed;
  693. }
  694. @if $font-family-pressed != $font-family {
  695. font-family: $font-family-pressed;
  696. }
  697. }
  698. }
  699. .#{$prefix}btn-#{$ui}-disabled {
  700. @if $border-color-disabled != $border-color {
  701. border-color: $border-color-disabled;
  702. }
  703. @if $background-color-disabled != null {
  704. @include background-gradient($background-color-disabled, $background-gradient-disabled);
  705. }
  706. .#{$prefix}btn-inner {
  707. @if $color-disabled != $color {
  708. color: $color !important;
  709. }
  710. @if $font-weight-disabled != $font-weight {
  711. font-weight: $font-weight-disabled;
  712. }
  713. @if $font-size-disabled != $font-size {
  714. font-size: $font-size-disabled;
  715. }
  716. @if $font-family-disabled != $font-family {
  717. font-family: $font-family-disabled;
  718. }
  719. }
  720. }
  721. .#{$prefix}ie .#{$prefix}btn-#{$ui}-disabled {
  722. .#{$prefix}btn-inner {
  723. @if $color-disabled != $color {
  724. color: darken($color-disabled, 20) !important;
  725. }
  726. }
  727. }
  728. .#{$prefix}ie6 .#{$prefix}btn-#{$ui}-disabled {
  729. .#{$prefix}btn-inner {
  730. @if $color-disabled != $color {
  731. color: $color-disabled !important;
  732. }
  733. }
  734. }
  735. @if not $supports-border-radius or $compile-all {
  736. .#{$prefix}nbr {
  737. .#{$prefix}btn-#{$ui}-over {
  738. .#{$prefix}frame-tl,
  739. .#{$prefix}frame-bl,
  740. .#{$prefix}frame-tr,
  741. .#{$prefix}frame-br,
  742. .#{$prefix}frame-tc,
  743. .#{$prefix}frame-bc {
  744. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-over-corners.gif');
  745. }
  746. .#{$prefix}frame-ml,
  747. .#{$prefix}frame-mr {
  748. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-over-sides.gif');
  749. }
  750. .#{$prefix}frame-mc {
  751. background-color: $background-color-over;
  752. @if $background-gradient-over != null {
  753. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-over-bg.gif');
  754. }
  755. }
  756. }
  757. .#{$prefix}btn-#{$ui}-focus {
  758. .#{$prefix}frame-tl,
  759. .#{$prefix}frame-bl,
  760. .#{$prefix}frame-tr,
  761. .#{$prefix}frame-br,
  762. .#{$prefix}frame-tc,
  763. .#{$prefix}frame-bc {
  764. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-focus-corners.gif');
  765. }
  766. .#{$prefix}frame-ml,
  767. .#{$prefix}frame-mr {
  768. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-focus-sides.gif');
  769. }
  770. .#{$prefix}frame-mc {
  771. background-color: $background-color-focus;
  772. @if $background-gradient-focus != null {
  773. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-focus-bg.gif');
  774. }
  775. }
  776. }
  777. .#{$prefix}btn-#{$ui}-menu-active,
  778. .#{$prefix}btn-#{$ui}-pressed {
  779. .#{$prefix}frame-tl,
  780. .#{$prefix}frame-bl,
  781. .#{$prefix}frame-tr,
  782. .#{$prefix}frame-br,
  783. .#{$prefix}frame-tc,
  784. .#{$prefix}frame-bc {
  785. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-pressed-corners.gif');
  786. }
  787. .#{$prefix}frame-ml,
  788. .#{$prefix}frame-mr {
  789. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-pressed-sides.gif');
  790. }
  791. .#{$prefix}frame-mc {
  792. background-color: $background-color-pressed;
  793. @if $background-gradient-pressed != null {
  794. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-pressed-bg.gif');
  795. }
  796. }
  797. }
  798. .#{$prefix}btn-#{$ui}-disabled {
  799. .#{$prefix}frame-tl,
  800. .#{$prefix}frame-bl,
  801. .#{$prefix}frame-tr,
  802. .#{$prefix}frame-br,
  803. .#{$prefix}frame-tc,
  804. .#{$prefix}frame-bc {
  805. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-disabled-corners.gif');
  806. }
  807. .#{$prefix}frame-ml,
  808. .#{$prefix}frame-mr {
  809. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-disabled-sides.gif');
  810. }
  811. .#{$prefix}frame-mc {
  812. background-color: $background-color-disabled;
  813. @if $background-gradient-disabled != null {
  814. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-disabled-bg.gif');
  815. }
  816. }
  817. }
  818. }
  819. }
  820. @if not $supports-gradients or $compile-all {
  821. @if $background-gradient != null {
  822. .#{$prefix}nlg {
  823. .#{$prefix}btn-#{$ui} {
  824. background-repeat: repeat-x;
  825. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-bg.gif');
  826. }
  827. }
  828. }
  829. @if $background-gradient-over != null {
  830. .#{$prefix}nlg {
  831. .#{$prefix}btn-#{$ui}-over {
  832. background-repeat: repeat-x;
  833. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-over-bg.gif');
  834. }
  835. }
  836. }
  837. @if $background-gradient-focus != null {
  838. .#{$prefix}nlg {
  839. .#{$prefix}btn-#{$ui}-focus {
  840. background-repeat: repeat-x;
  841. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-focus-bg.gif');
  842. }
  843. }
  844. }
  845. @if $background-gradient-pressed != null {
  846. .#{$prefix}nlg {
  847. .#{$prefix}btn-#{$ui}-menu-active,
  848. .#{$prefix}btn-#{$ui}-pressed {
  849. background-repeat: repeat-x;
  850. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-pressed-bg.gif');
  851. }
  852. }
  853. }
  854. @if $background-gradient-disabled != null {
  855. .#{$prefix}nlg {
  856. .#{$prefix}btn-#{$ui}-disabled {
  857. background-repeat: repeat-x;
  858. background-image: theme-background-image($theme-name, 'btn/btn-#{$ui}-disabled-bg.gif');
  859. }
  860. }
  861. }
  862. }
  863. };