Button.scss 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653
  1. /**
  2. * @class Ext.Button
  3. */
  4. /**
  5. * @var {boolean}
  6. * Determines if styles are added to invert text and background colors for
  7. * confirm & decline buttons UIs when combined with the 'alt' UI
  8. */
  9. $enable-inverted-alt-button: dynamic(false);
  10. /**
  11. * @var {color}
  12. * Button background-color
  13. */
  14. $button-background-color: dynamic($neutral-light-color);
  15. /**
  16. * @var {color}
  17. * Button background-color when hovered
  18. */
  19. $button-hovered-background-color: dynamic(button-hovered-background-color($button-background-color));
  20. /**
  21. * @var {color}
  22. * Button background-color when pressed
  23. */
  24. $button-pressed-background-color: dynamic(button-pressed-background-color($button-background-color));
  25. /**
  26. * @var {color}
  27. * Button background-color when pressed and hovered
  28. */
  29. $button-pressed-hovered-background-color: dynamic(null);
  30. /**
  31. * @var {color}
  32. * Button background-color when focused
  33. */
  34. $button-focused-background-color: dynamic(button-focused-background-color($button-background-color));
  35. /**
  36. * @var {color}
  37. * Button background-color when focused and hovered
  38. */
  39. $button-focused-hovered-background-color: dynamic(null);
  40. /**
  41. * @var {color}
  42. * Button background-color when disabled
  43. */
  44. $button-disabled-background-color: dynamic(button-disabled-background-color($button-background-color));
  45. //# fashion replaces $button-shadow
  46. /**
  47. * @var {list}
  48. * Button box-shadow
  49. */
  50. $button-box-shadow: dynamic(null);
  51. /**
  52. * @var {list}
  53. * Button box-shadow when hovered
  54. */
  55. $button-hovered-box-shadow: dynamic(null);
  56. //# fashion replaces $button-pressed-shadow
  57. /**
  58. * @var {list}
  59. * Button box-shadow when pressed
  60. */
  61. $button-pressed-box-shadow: dynamic(null);
  62. /**
  63. * @var {list}
  64. * Button box-shadow when focused
  65. */
  66. $button-focused-box-shadow: dynamic(null);
  67. /**
  68. * @var {list}
  69. * Button box-shadow when disabled
  70. */
  71. $button-disabled-box-shadow: dynamic(null);
  72. /**
  73. * @var {list}
  74. * Transition for the Button's box-shadow
  75. */
  76. $button-box-shadow-transition: dynamic(null);
  77. /**
  78. * @var {string/list}
  79. * Button background-gradient. Can be either the name of a gradient defined by
  80. * {@link Global_CSS#background-gradient} or a list of color stops.
  81. */
  82. $button-background-gradient: dynamic(button-background-gradient($button-background-color));
  83. /**
  84. * @var {string/list}
  85. * Button background-gradient when hovered. Can be either the name of a gradient
  86. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  87. */
  88. $button-hovered-background-gradient: dynamic(button-hovered-background-gradient($button-hovered-background-color));
  89. /**
  90. * @var {string/list}
  91. * Button background-gradient when pressed. Can be either the name of a gradient
  92. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  93. */
  94. $button-pressed-background-gradient: dynamic(button-pressed-background-gradient($button-pressed-background-color));
  95. /**
  96. * @var {string/list}
  97. * Button background-gradient when pressed and hovered. Can be either the name of a gradient
  98. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  99. */
  100. $button-pressed-hovered-background-gradient: dynamic(null);
  101. /**
  102. * @var {string/list}
  103. * Button background-gradient when focused. Can be either the name of a gradient
  104. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  105. */
  106. $button-focused-background-gradient: dynamic(button-focused-background-gradient($button-focused-background-color));
  107. /**
  108. * @var {string/list}
  109. * Button background-gradient when focused and hovered. Can be either the name of a gradient
  110. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  111. */
  112. $button-focused-hovered-background-gradient: dynamic(null);
  113. /**
  114. * @var {string/list}
  115. * Button background-gradient when disabled. Can be either the name of a gradient
  116. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  117. */
  118. $button-disabled-background-gradient: dynamic(button-disabled-background-gradient($button-disabled-background-color));
  119. /**
  120. * @var {color}
  121. * Button text color
  122. */
  123. $button-color: dynamic(button-color($button-background-color));
  124. /**
  125. * @var {color}
  126. * Button text color when hovered
  127. */
  128. $button-hovered-color: dynamic(button-hovered-color($button-hovered-background-color, $button-color));
  129. /**
  130. * @var {color}
  131. * Button text color when pressed
  132. */
  133. $button-pressed-color: dynamic(button-pressed-color($button-pressed-background-color, $button-color));
  134. /**
  135. * @var {color}
  136. * Button text color when focused
  137. */
  138. $button-focused-color: dynamic(button-focused-color($button-focused-background-color, $button-color));
  139. /**
  140. * @var {color}
  141. * Button color when disabled
  142. */
  143. $button-disabled-color: dynamic(button-disabled-color($button-disabled-background-color));
  144. /**
  145. * @var {color/list}
  146. * Button border-color
  147. */
  148. $button-border-color: dynamic(button-border-color($button-background-color));
  149. /**
  150. * @var {color/list}
  151. * Button border-color when hovered
  152. */
  153. $button-hovered-border-color: dynamic(button-hovered-border-color($button-hovered-background-color));
  154. /**
  155. * @var {color/list}
  156. * Button border-color when pressed
  157. */
  158. $button-pressed-border-color: dynamic(button-pressed-border-color($button-pressed-background-color));
  159. /**
  160. * @var {color/list}
  161. * Button border-color when focused
  162. */
  163. $button-focused-border-color: dynamic(button-focused-border-color($button-focused-background-color));
  164. /**
  165. * @var {color/list}
  166. * Button border-color when disabled
  167. */
  168. $button-disabled-border-color: dynamic(button-disabled-border-color($button-disabled-background-color));
  169. /**
  170. * @var {color}
  171. * Button focus outline color
  172. */
  173. $button-focused-outline-color: dynamic(button-focused-outline-color($button-background-color, $button-focused-color));
  174. /**
  175. * @var {string}
  176. * Button focus outline style
  177. */
  178. $button-focused-outline-style: dynamic(solid);
  179. /**
  180. * @var {number}
  181. * Button focus outline width
  182. */
  183. $button-focused-outline-width: dynamic(1px);
  184. /**
  185. * @var {number}
  186. * Button focus outline offset
  187. */
  188. $button-focused-outline-offset: dynamic(-2px);
  189. /**
  190. * @var {number/list}
  191. * Button border-width
  192. */
  193. $button-border-width: dynamic(1px);
  194. /**
  195. * @var {string/list}
  196. * Button border-style
  197. */
  198. $button-border-style: dynamic(solid);
  199. /**
  200. * @var {number}
  201. * Button border-radius
  202. */
  203. $button-border-radius: dynamic(3px);
  204. /**
  205. * @var {number}
  206. * Button border-radius in the {@link Global_CSS#$enable-big big} sizing scheme
  207. */
  208. $button-border-radius-big: dynamic(3px);
  209. /**
  210. * @var {string/number}
  211. * Button font-weight
  212. */
  213. $button-font-weight: dynamic($font-weight-bold);
  214. /**
  215. * @var {number}
  216. * Button font-size
  217. */
  218. $button-font-size: dynamic($font-size);
  219. /**
  220. * @var {number}
  221. * Button font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  222. */
  223. $button-font-size-big: dynamic($font-size-big);
  224. /**
  225. * @var {number}
  226. * Button line-height
  227. */
  228. $button-line-height: dynamic(16px);
  229. /**
  230. * @var {number}
  231. * Button line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  232. */
  233. $button-line-height-big: dynamic(20px);
  234. /**
  235. * @var {string}
  236. * Button font-family
  237. */
  238. $button-font-family: dynamic($font-family);
  239. /**
  240. * @var {string}
  241. * Button text-transform
  242. */
  243. $button-text-transform: dynamic(null);
  244. /**
  245. * @var {string}
  246. * Button text-transform in the {@link Global_CSS#$enable-big big} sizing scheme
  247. */
  248. $button-text-transform-big: dynamic($button-text-transform);
  249. /**
  250. * @var {number/list}
  251. * Button padding
  252. */
  253. $button-padding: dynamic(3px 8px);
  254. /**
  255. * @var {number/list}
  256. * Button padding in the {@link Global_CSS#$enable-big big} sizing scheme
  257. */
  258. $button-padding-big: dynamic(5px 10px);
  259. /**
  260. * @var {number/list}
  261. * Button padding when an icon is present without text
  262. */
  263. $button-icon-only-padding: dynamic(nth($button-padding, 1));
  264. /**
  265. * @var {number/list}
  266. * Button padding when an icon is present without text in the {@link Global_CSS#$enable-big big} sizing scheme
  267. */
  268. $button-icon-only-padding-big: dynamic(nth($button-padding-big, 1));
  269. /**
  270. * @var {color}
  271. * Button icon color.
  272. */
  273. $button-icon-color: dynamic($button-color);
  274. /**
  275. * @var {color}
  276. * Button icon color when hovered.
  277. */
  278. $button-hovered-icon-color: dynamic($button-hovered-color);
  279. /**
  280. * @var {color}
  281. * Button icon color when pressed.
  282. */
  283. $button-pressed-icon-color: dynamic($button-pressed-color);
  284. /**
  285. * @var {color}
  286. * Button icon color when focused
  287. */
  288. $button-focused-icon-color: dynamic($button-focused-color);
  289. /**
  290. * @var {color}
  291. * Button icon color when disabled
  292. */
  293. $button-disabled-icon-color: dynamic($button-disabled-color);
  294. /**
  295. * @var {number}
  296. * Button icon size.
  297. */
  298. $button-icon-size: dynamic($button-line-height);
  299. /**
  300. * @var {number}
  301. * Button icon size in the {@link Global_CSS#$enable-big big} sizing scheme
  302. */
  303. $button-icon-size-big: dynamic($button-line-height-big);
  304. /**
  305. * @var {number}
  306. * Button icon font-size
  307. */
  308. $button-icon-font-size: dynamic(null);
  309. /**
  310. * @var {number}
  311. * Button icon font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  312. */
  313. $button-icon-font-size-big: dynamic(null);
  314. /**
  315. * @var {number}
  316. * The space between the button icon and text when the icon is horizontally aligned
  317. */
  318. $button-icon-horizontal-spacing: dynamic(5px);
  319. /**
  320. * @var {number}
  321. * The space between the button icon and text when the icon is horizontally aligned
  322. * in the {@link Global_CSS#$enable-big big} sizing scheme
  323. */
  324. $button-icon-horizontal-spacing-big: dynamic(8px);
  325. /**
  326. * @var {number}
  327. * The space between the button icon and text when the icon is vertically aligned
  328. */
  329. $button-icon-vertical-spacing: dynamic(2px);
  330. /**
  331. * @var {number}
  332. * The space between the button icon and text when the icon is vertically aligned
  333. * in the {@link Global_CSS#$enable-big big} sizing scheme
  334. */
  335. $button-icon-vertical-spacing-big: dynamic(3px);
  336. /**
  337. * @var {number}
  338. * Button opacity when disabled
  339. */
  340. $button-disabled-opacity: dynamic(.5);
  341. /**
  342. * @var {string}
  343. * Button arrow icon
  344. */
  345. $button-arrow-icon: dynamic($fa-var-caret-down);
  346. /**
  347. * @var {color}
  348. * Button arrow icon color
  349. */
  350. $button-arrow-icon-color: dynamic($button-color);
  351. /**
  352. * @var {color}
  353. * Button arrow icon color when hovered
  354. */
  355. $button-hovered-arrow-icon-color: dynamic($button-hovered-icon-color);
  356. /**
  357. * @var {color}
  358. * Button arrow icon color when pressed
  359. */
  360. $button-pressed-arrow-icon-color: dynamic($button-pressed-icon-color);
  361. /**
  362. * @var {color}
  363. * Button arrow icon color when focused
  364. */
  365. $button-focused-arrow-icon-color: dynamic($button-focused-icon-color);
  366. /**
  367. * @var {color}
  368. * Button arrow icon color when disabled
  369. */
  370. $button-disabled-arrow-icon-color: dynamic($button-disabled-icon-color);
  371. /**
  372. * @var {number}
  373. * Button arrow icon size
  374. */
  375. $button-arrow-icon-size: dynamic($button-line-height);
  376. /**
  377. * @var {number}
  378. * Button arrow icon size in the {@link Global_CSS#$enable-big big} sizing scheme
  379. */
  380. $button-arrow-icon-size-big: dynamic($button-line-height-big);
  381. /**
  382. * @var {number}
  383. * Button arrow icon font-size
  384. */
  385. $button-arrow-icon-font-size: dynamic(null);
  386. /**
  387. * @var {number}
  388. * Button arrow icon font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  389. */
  390. $button-arrow-icon-font-size-big: dynamic(null);
  391. /**
  392. * @var {number}
  393. * The space between the button arrow and text when {@link #arrowAlign} is `'right'`
  394. */
  395. $button-arrow-horizontal-spacing: dynamic(5px);
  396. /**
  397. * @var {number}
  398. * The space between the button arrow and text when {@link #arrowAlign} is `'right'`
  399. * in the {@link Global_CSS#$enable-big big} sizing scheme
  400. */
  401. $button-arrow-horizontal-spacing-big: dynamic(8px);
  402. /**
  403. * @var {number}
  404. * The space between the button arrow and text when {@link #arrowAlign} is `'bottom'`
  405. */
  406. $button-arrow-vertical-spacing: dynamic(null);
  407. /**
  408. * @var {number}
  409. * The space between the button arrow and text when {@link #arrowAlign} is `'bottom'`
  410. * in the {@link Global_CSS#$enable-big big} sizing scheme
  411. */
  412. $button-arrow-vertical-spacing-big: dynamic(null);
  413. /**
  414. * @var {color}
  415. * The background-color of the button's {@link #badgeText badge}
  416. */
  417. $button-badge-background-color: dynamic(darken($alert-color, 10%));
  418. /**
  419. * @var {string/list}
  420. * The background-gradient of the button's {@link #badgeText badge} Can be either the name
  421. * of a gradient defined by {@link Global_CSS#background-gradient} or a list of color stops.
  422. */
  423. $button-badge-background-gradient: dynamic($base-background-gradient);
  424. /**
  425. * @var {color}
  426. * The text color of the button's {@link #badgeText badge}
  427. */
  428. $button-badge-color: dynamic(color-by-background($button-badge-background-color));
  429. /**
  430. * @var {color}
  431. * The border-color of the button's {@link #badgeText badge}
  432. */
  433. $button-badge-border-color: dynamic(darken($button-badge-background-color, 10%));
  434. /**
  435. * @var {number/list}
  436. * The border-radius of the button's {@link #badgeText badge}
  437. */
  438. $button-badge-border-radius: dynamic(3px);
  439. /**
  440. * @var {number}
  441. * The min-width of the button's {@link #badgeText badge}
  442. */
  443. $button-badge-min-width: dynamic(null);
  444. /**
  445. * @var {number}
  446. * The max-width of the button's {@link #badgeText badge}
  447. */
  448. $button-badge-max-width: dynamic(95%);
  449. /**
  450. * @var {string/number}
  451. * The font-weight of the button's {@link #badgeText badge}
  452. */
  453. $button-badge-font-weight: dynamic(null);
  454. /**
  455. * @var {number}
  456. * The font-size of the button's {@link #badgeText badge}
  457. */
  458. $button-badge-font-size: dynamic(12px);
  459. /**
  460. * @var {number}
  461. * The font-size of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  462. */
  463. $button-badge-font-size-big: dynamic(13px);
  464. /**
  465. * @var {string}
  466. * The font-family of the button's {@link #badgeText badge}
  467. */
  468. $button-badge-font-family: dynamic($button-font-family);
  469. /**
  470. * @var {number}
  471. * The line-height of the button's {@link #badgeText badge}
  472. */
  473. $button-badge-line-height: dynamic(14px);
  474. /**
  475. * @var {number}
  476. * The line-height of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  477. */
  478. $button-badge-line-height-big: dynamic(16px);
  479. /**
  480. * @var {number}
  481. * Offset of the {@link #badgeText badge} from the top of the button
  482. */
  483. $button-badge-top: dynamic(-3px);
  484. /**
  485. * @var {number}
  486. * Offset of the {@link #badgeText badge} from the right of the button
  487. */
  488. $button-badge-right: dynamic(0);
  489. /**
  490. * @var {number}
  491. * Offset of the {@link #badgeText badge} from the bottom of the button
  492. */
  493. $button-badge-bottom: dynamic(null);
  494. /**
  495. * @var {number}
  496. * Offset of the {@link #badgeText badge} from the left of the button
  497. */
  498. $button-badge-left: dynamic(null);
  499. /**
  500. * @var {number}
  501. * The padding of the button's {@link #badgeText badge}
  502. */
  503. $button-badge-padding: dynamic(1px 4px);
  504. /**
  505. * @var {number}
  506. * The padding of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  507. */
  508. $button-badge-padding-big: dynamic($button-badge-padding);
  509. /**
  510. * @var {map}
  511. * Parameters for the "action" button UI.
  512. * Set to `null` to eliminate the UI from the CSS output.
  513. */
  514. $button-action-ui: dynamic((
  515. background-color: $base-highlight-color
  516. ));
  517. /**
  518. * @var {map}
  519. * Parameters for the "alt" button UI.
  520. * Set to `null` to eliminate the UI from the CSS output.
  521. */
  522. $button-alt-ui: dynamic((
  523. color: $panel-tool-color,
  524. background-color: transparent,
  525. border-width: 0,
  526. pressed-background-color: transparent
  527. ));
  528. /**
  529. * @var {map}
  530. * Parameters for the "confirm" button UI.
  531. * Set to `null` to eliminate the UI from the CSS output.
  532. */
  533. $button-confirm-ui: dynamic((
  534. background-color: desaturate(darken($confirm-color, 10%), 5%)
  535. ));
  536. /**
  537. * @var {map}
  538. * Parameters for the "decline" button UI.
  539. * Set to `null` to eliminate the UI from the CSS output.
  540. */
  541. $button-decline-ui: dynamic((
  542. background-color: desaturate(darken($alert-color, 10%), 5%)
  543. ));
  544. /**
  545. * @var {map}
  546. * Parameters for the "round" button UI.
  547. * Set to `null` to eliminate the UI from the CSS output.
  548. */
  549. $button-round-ui: dynamic((
  550. border-radius: 10000px,
  551. border-radius-big: 20000px
  552. ));
  553. /**
  554. * @var {map}
  555. * Parameters for the "square" button UI.
  556. * Set to `null` to eliminate the UI from the CSS output.
  557. */
  558. $button-square-ui: dynamic((
  559. border-radius: 0,
  560. border-radius-big: 0
  561. ));
  562. /**
  563. * @var {map}
  564. * Parameters for the "flat" button UI.
  565. * Set to `null` to eliminate the UI from the CSS output.
  566. */
  567. $button-flat-ui: dynamic((
  568. border-width: 0,
  569. background-color: transparent
  570. ));
  571. /**
  572. * @var {map}
  573. * Parameters for the "plain" button UI.
  574. * Set to `null` to eliminate the UI from the CSS output.
  575. */
  576. $button-plain-ui: dynamic((
  577. border-width: 0,
  578. background-color: transparent
  579. ));
  580. /**
  581. * @var {map}
  582. * Parameters for the "segmented" button UI.
  583. * Set to `null` to eliminate the UI from the CSS output.
  584. */
  585. $button-segmented-ui: dynamic(null);
  586. /**
  587. * @var {map}
  588. * Parameters for the "raised" button UI.
  589. * Set to `null` to eliminate the UI from the CSS output.
  590. */
  591. $button-raised-ui: dynamic((
  592. box-shadow: (2px 2px 5px 0 rgba(0, 0, 0, 0.12), 2px 2px 5px 0 rgba(0, 0, 0, 0.08))
  593. ));
  594. /**
  595. * Creates a visual theme for a Button.
  596. *
  597. * @param {string} $ui
  598. * The name of the UI being created. Can not included spaces or special punctuation
  599. * (used in CSS class names).
  600. *
  601. * @param {String} [$xtype=button] (protected) The {@link Ext.Class#xtype} to use
  602. * in CSS selectors. For use by UI mixins of derived classes.
  603. *
  604. * @param {color} $background-color
  605. * Button background-color
  606. *
  607. * @param {color} $hovered-background-color
  608. * Button background-color when hovered
  609. *
  610. * @param {color} $pressed-background-color
  611. * Button background-color when pressed
  612. *
  613. * @param {color} $pressed-hovered-background-color
  614. * Button background-color when pressed and hovered
  615. *
  616. * @param {color} $focused-background-color
  617. * Button background-color when focused
  618. *
  619. * @param {color} $focused-hovered-background-color
  620. * Button background-color when focused and hovered
  621. *
  622. * @param {color} $disabled-background-color
  623. * Button background-color when disabled
  624. *
  625. * @param {list} $box-shadow
  626. * Button box-shadow
  627. *
  628. * @param {list} $hovered-box-shadow
  629. * Button box-shadow when hovered
  630. *
  631. * @param {list} $pressed-box-shadow
  632. * Button box-shadow when pressed
  633. *
  634. * @param {list} $focused-box-shadow
  635. * Button box-shadow when focused
  636. *
  637. * @param {list} $disabled-box-shadow
  638. * Button box-shadow when disabled
  639. *
  640. * @param {list} $box-shadow-transition
  641. * The transition for the Button's box-shadow
  642. *
  643. * @param {string/list} $background-gradient
  644. * Button background-gradient. Can be either the name of a gradient defined by
  645. * {@link Global_CSS#background-gradient} or a list of color stops.
  646. *
  647. * @param {string/list} $hovered-background-gradient
  648. * Button background-gradient when hovered. Can be either the name of a gradient
  649. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  650. *
  651. * @param {string/list} $pressed-background-gradient
  652. * Button background-gradient when pressed. Can be either the name of a gradient
  653. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  654. *
  655. * @param {string/list} $pressed-hovered-background-gradient
  656. * Button background-gradient when pressed and hovered. Can be either the name of a gradient
  657. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  658. *
  659. * @param {string/list} $focused-background-gradient
  660. * Button background-gradient when focused. Can be either the name of a gradient
  661. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  662. *
  663. * @param {string/list} $focused-hovered-background-gradient
  664. * Button background-gradient when focused and govered. Can be either the name of a gradient
  665. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  666. *
  667. * @param {string/list} $disabled-background-gradient
  668. * Button background-gradient when disabled. Can be either the name of a gradient
  669. * defined by {@link Global_CSS#background-gradient} or a list of color stops.
  670. *
  671. * @param {color} $color
  672. * Button text color
  673. *
  674. * @param {color} $hovered-color
  675. * Button text color when hovered
  676. *
  677. * @param {color} $pressed-color
  678. * Button text color when pressed
  679. *
  680. * @param {color} $focused-color
  681. * Button text color when focused
  682. *
  683. * @param {color} $disabled-color
  684. * Button color when disabled
  685. *
  686. * @param {color/list} $border-color
  687. * Button border-color
  688. *
  689. * @param {color/list} $hovered-border-color
  690. * Button border-color when hovered
  691. *
  692. * @param {color/list} $pressed-border-color
  693. * Button border-color when pressed
  694. *
  695. * @param {color/list} $focused-border-color
  696. * Button border-color when focused
  697. *
  698. * @param {color/list} $disabled-border-color
  699. * Button border-color when disabled
  700. *
  701. * @param {color} $focused-outline-color
  702. * Button focus outline color
  703. *
  704. * @param {string} $focused-outline-style
  705. * Button focus outline style
  706. *
  707. * @param {number} $focused-outline-width
  708. * Button focus outline width
  709. *
  710. * @param {number} $focused-outline-offset
  711. * Button focus outline offset
  712. *
  713. * @param {number/list} $border-width
  714. * Button border-width
  715. *
  716. * @param {string/list} $border-style
  717. * Button border-style
  718. *
  719. * @param {number} $border-radius
  720. * Button border-radius
  721. *
  722. * @param {number} $border-radius-big
  723. * Button border-radius in the {@link Global_CSS#$enable-big big} sizing scheme
  724. *
  725. * @param {string/number} $font-weight
  726. * Button font-weight
  727. *
  728. * @param {number} $font-size
  729. * Button font-size
  730. *
  731. * @param {number} $font-size-big
  732. * Button font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  733. *
  734. * @param {number} $line-height
  735. * Button line-height
  736. *
  737. * @param {number} $line-height-big
  738. * Button line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  739. *
  740. * @param {string} $font-family
  741. * Button font-family
  742. *
  743. * @param {string} $text-transform
  744. * Button text-transform
  745. *
  746. * @param {string} $text-transform-big
  747. * Button text-transform in the {@link Global_CSS#$enable-big big} sizing scheme
  748. *
  749. * @param {number/list} $padding
  750. * Button padding
  751. *
  752. * @param {number/list} $padding-big
  753. * Button padding in the {@link Global_CSS#$enable-big big} sizing scheme
  754. *
  755. * @param {number/list} $icon-only-padding
  756. * Button padding when an icon is present without text
  757. *
  758. * @param {number/list} $icon-only-padding-big
  759. * Button padding when an icon is present without text in the {@link Global_CSS#$enable-big big} sizing scheme
  760. *
  761. * @param {color} $icon-color
  762. * Button icon color.
  763. *
  764. * @param {color} $hovered-icon-color
  765. * Button icon color when hovered.
  766. *
  767. * @param {color} $pressed-icon-color
  768. * Button icon color when pressed.
  769. *
  770. * @param {color} $focused-icon-color
  771. * Button icon color when focused
  772. *
  773. * @param {color} $disabled-icon-color
  774. * Button icon color when disabled
  775. *
  776. * @param {number} $icon-size
  777. * Button icon size.
  778. *
  779. * @param {number} $icon-size-big
  780. * Button icon size in the {@link Global_CSS#$enable-big big} sizing scheme
  781. *
  782. * @param {number} $icon-font-size
  783. * Button icon font-size
  784. *
  785. * @param {number} $icon-font-size-big
  786. * Button icon font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  787. *
  788. * @param {number} $icon-horizontal-spacing
  789. * The space between the button icon and text when the icon is horizontally aligned
  790. *
  791. * @param {number} $icon-horizontal-spacing-big
  792. * The space between the button icon and text when the icon is horizontally aligned
  793. * in the {@link Global_CSS#$enable-big big} sizing scheme
  794. *
  795. * @param {number} $icon-vertical-spacing
  796. * The space between the button icon and text when the icon is vertically aligned
  797. *
  798. * @param {number} $icon-vertical-spacing-big
  799. * The space between the button icon and text when the icon is vertically aligned
  800. * in the {@link Global_CSS#$enable-big big} sizing scheme
  801. *
  802. * @param {number} $disabled-opacity
  803. * Button opacity when disabled
  804. *
  805. * @param {string} $arrow-icon
  806. * Button arrow icon
  807. *
  808. * @param {color} $arrow-icon-color
  809. * Button arrow icon color
  810. *
  811. * @param {color} $hovered-arrow-icon-color
  812. * Button arrow icon color when hovered
  813. *
  814. * @param {color} $pressed-arrow-icon-color
  815. * Button arrow icon color when pressed
  816. *
  817. * @param {color} $focused-arrow-icon-color
  818. * Button arrow icon color when focused
  819. *
  820. * @param {color} $disabled-arrow-icon-color
  821. * Button arrow icon color when disabled
  822. *
  823. * @param {number} $arrow-icon-size
  824. * Button arrow icon size
  825. *
  826. * @param {number} $arrow-icon-size-big
  827. * Button arrow icon size in the {@link Global_CSS#$enable-big big} sizing scheme
  828. *
  829. * @param {number} $arrow-icon-font-size
  830. * Button arrow icon font-size
  831. *
  832. * @param {number} $arrow-icon-font-size-big
  833. * Button arrow icon font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  834. *
  835. * @param {number} $arrow-horizontal-spacing
  836. * The space between the button arrow and text when {@link #arrowAlign} is `'right'`
  837. *
  838. * @param {number} $arrow-horizontal-spacing-big
  839. * The space between the button arrow and text when {@link #arrowAlign} is `'right'`
  840. * in the {@link Global_CSS#$enable-big big} sizing scheme
  841. *
  842. * @param {number} $arrow-vertical-spacing
  843. * The space between the button arrow and text when {@link #arrowAlign} is `'bottom'`
  844. *
  845. * @param {number} $arrow-vertical-spacing-big
  846. * The space between the button arrow and text when {@link #arrowAlign} is `'bottom'`
  847. * in the {@link Global_CSS#$enable-big big} sizing scheme
  848. *
  849. * @param {color} $badge-background-color
  850. * The background-color of the button's {@link #badgeText badge}
  851. *
  852. * @param {string/list} $badge-background-gradient
  853. * The background-gradient of the button's {@link #badgeText badge} Can be either the name
  854. * of a gradient defined by {@link Global_CSS#background-gradient} or a list of color stops.
  855. *
  856. * @param {color} $badge-color
  857. * The text color of the button's {@link #badgeText badge}
  858. *
  859. * @param {color} $badge-border-color
  860. * The border-color of the button's {@link #badgeText badge}
  861. *
  862. * @param {number/list} $badge-border-radius
  863. * The border-radius of the button's {@link #badgeText badge}
  864. *
  865. * @param {number} $badge-min-width
  866. * The min-width of the button's {@link #badgeText badge}
  867. *
  868. * @param {number} $badge-max-width
  869. * The max-width of the button's {@link #badgeText badge}
  870. *
  871. * @param {string/number} $badge-font-weight
  872. * The font-weight of the button's {@link #badgeText badge}
  873. *
  874. * @param {number} $badge-font-size
  875. * The font-size of the button's {@link #badgeText badge}
  876. *
  877. * @param {number} $badge-font-size-big
  878. * The font-size of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  879. *
  880. * @param {string} $badge-font-family
  881. * The font-family of the button's {@link #badgeText badge}
  882. *
  883. * @param {number} $badge-line-height
  884. * The line-height of the button's {@link #badgeText badge}
  885. *
  886. * @param {number} $badge-line-height-big
  887. * The line-height of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  888. *
  889. * @param {number} $badge-top
  890. * Offset of the {@link #badgeText badge} from the top of the button
  891. *
  892. * @param {number} $badge-right
  893. * Offset of the {@link #badgeText badge} from the right of the button
  894. *
  895. * @param {number} $badge-bottom
  896. * Offset of the {@link #badgeText badge} from the bottom of the button
  897. *
  898. * @param {number} $badge-left
  899. * Offset of the {@link #badgeText badge} from the left of the button
  900. *
  901. * @param {number} $badge-padding
  902. * The padding of the button's {@link #badgeText badge}
  903. *
  904. * @param {number} $badge-padding-big
  905. * The padding of the button's {@link #badgeText badge} in the {@link Global_CSS#$enable-big big} sizing scheme
  906. *
  907. * @param {boolean} [$derive-colors=true]
  908. * Private
  909. *
  910. * @param {boolean} [$derive-border-colors=true]
  911. * Private
  912. *
  913. * @param {boolean} [$derive-outline-colors=true]
  914. * Private
  915. *
  916. * @param {boolean} [$derive-background-colors=true]
  917. * Private
  918. *
  919. * @param {boolean} [$derive-background-gradients=true]
  920. * Private
  921. *
  922. * @param {boolean} [$derive-icon-colors=true]
  923. * Private
  924. *
  925. * @param {boolean} [$derive-arrow-colors=true]
  926. * Private
  927. */
  928. @mixin button-ui(
  929. $ui: null,
  930. $xtype: button,
  931. $background-color: null,
  932. $hovered-background-color: null,
  933. $pressed-background-color: null,
  934. $pressed-hovered-background-color: null,
  935. $focused-background-color: null,
  936. $focused-hovered-background-color: null,
  937. $disabled-background-color: null,
  938. $box-shadow: null,
  939. $hovered-box-shadow: null,
  940. $pressed-box-shadow: null,
  941. $focused-box-shadow: null,
  942. $disabled-box-shadow: null,
  943. $box-shadow-transition: null,
  944. $background-gradient: null,
  945. $hovered-background-gradient: null,
  946. $pressed-background-gradient: null,
  947. $pressed-hovered-background-gradient: null,
  948. $focused-background-gradient: null,
  949. $focused-hovered-background-gradient: null,
  950. $disabled-background-gradient: null,
  951. $color: null,
  952. $hovered-color: null,
  953. $pressed-color: null,
  954. $focused-color: null,
  955. $disabled-color: null,
  956. $border-color: null,
  957. $hovered-border-color: null,
  958. $pressed-border-color: null,
  959. $focused-border-color: null,
  960. $disabled-border-color: null,
  961. $focused-outline-color: null,
  962. $focused-outline-style: null,
  963. $focused-outline-width: null,
  964. $focused-outline-offset: null,
  965. $border-width: null,
  966. $border-style: null,
  967. $border-radius: null,
  968. $border-radius-big: null,
  969. $font-weight: null,
  970. $font-size: null,
  971. $font-size-big: null,
  972. $line-height: null,
  973. $line-height-big: null,
  974. $font-family: null,
  975. $text-transform: null,
  976. $text-transform-big: null,
  977. $padding: null,
  978. $padding-big: null,
  979. $icon-only-padding: null,
  980. $icon-only-padding-big: null,
  981. $icon-color: null,
  982. $hovered-icon-color: null,
  983. $pressed-icon-color: null,
  984. $focused-icon-color: null,
  985. $disabled-icon-color: null,
  986. $icon-size: null,
  987. $icon-size-big: null,
  988. $icon-font-size: null,
  989. $icon-font-size-big: null,
  990. $icon-horizontal-spacing: null,
  991. $icon-horizontal-spacing-big: null,
  992. $icon-vertical-spacing: null,
  993. $icon-vertical-spacing-big: null,
  994. $disabled-opacity: null,
  995. $arrow-icon: null,
  996. $arrow-icon-color: null,
  997. $hovered-arrow-icon-color: null,
  998. $pressed-arrow-icon-color: null,
  999. $focused-arrow-icon-color: null,
  1000. $disabled-arrow-icon-color: null,
  1001. $arrow-icon-size: null,
  1002. $arrow-icon-size-big: null,
  1003. $arrow-icon-font-size: null,
  1004. $arrow-icon-font-size-big: null,
  1005. $arrow-horizontal-spacing: null,
  1006. $arrow-horizontal-spacing-big: null,
  1007. $arrow-vertical-spacing: null,
  1008. $arrow-vertical-spacing-big: null,
  1009. $badge-background-color: null,
  1010. $badge-background-gradient: null,
  1011. $badge-color: null,
  1012. $badge-border-color: null,
  1013. $badge-border-radius: null,
  1014. $badge-min-width: null,
  1015. $badge-max-width: null,
  1016. $badge-font-weight: null,
  1017. $badge-font-size: null,
  1018. $badge-font-size-big: null,
  1019. $badge-font-family: null,
  1020. $badge-line-height: null,
  1021. $badge-line-height-big: null,
  1022. $badge-top: null,
  1023. $badge-right: null,
  1024. $badge-bottom: null,
  1025. $badge-left: null,
  1026. $badge-padding: null,
  1027. $badge-padding-big: null,
  1028. // private
  1029. $derive-colors: true,
  1030. $derive-border-colors: true,
  1031. $derive-outline-colors: true,
  1032. $derive-background-colors: true,
  1033. $derive-background-gradients: true,
  1034. $derive-icon-colors: true,
  1035. $derive-arrow-colors: true
  1036. ) {
  1037. $ui-suffix: ui-suffix($ui);
  1038. @if $background-color != null {
  1039. @if $derive-background-colors and ($hovered-background-color == null) {
  1040. $hovered-background-color: button-hovered-background-color($background-color);
  1041. }
  1042. @if $derive-background-colors and ($pressed-background-color == null) {
  1043. $pressed-background-color: button-pressed-background-color($background-color);
  1044. }
  1045. @if $derive-background-colors and ($focused-background-color == null) {
  1046. $focused-background-color: button-focused-background-color($background-color);
  1047. }
  1048. @if $derive-background-colors and ($disabled-background-color == null) {
  1049. $disabled-background-color: button-disabled-background-color($background-color);
  1050. }
  1051. @if $derive-border-colors and ($border-color == null) {
  1052. $border-color: button-border-color($background-color);
  1053. }
  1054. @if $derive-colors and ($color == null) {
  1055. $color: button-color($background-color);
  1056. }
  1057. @if $derive-background-gradients and ($background-gradient == null) {
  1058. $background-gradient: button-background-gradient($background-color);
  1059. }
  1060. }
  1061. @if $hovered-background-color != null {
  1062. @if $derive-border-colors and ($hovered-border-color == null) {
  1063. $hovered-border-color: button-hovered-border-color($hovered-background-color);
  1064. }
  1065. @if $derive-colors and ($hovered-color == null) {
  1066. $hovered-color: button-hovered-color($hovered-background-color, $color);
  1067. }
  1068. @if $derive-background-gradients and ($hovered-background-gradient == null) {
  1069. $hovered-background-gradient: button-hovered-background-gradient($hovered-background-color);
  1070. }
  1071. }
  1072. @if $pressed-background-color != null {
  1073. @if $derive-border-colors and ($pressed-border-color == null) {
  1074. $pressed-border-color: button-pressed-border-color($pressed-background-color);
  1075. }
  1076. @if $derive-colors and ($pressed-color == null) {
  1077. $pressed-color: button-pressed-color($pressed-background-color, $color);
  1078. }
  1079. @if $derive-background-gradients and ($pressed-background-gradient == null) {
  1080. $pressed-background-gradient: button-pressed-background-gradient($pressed-background-color);
  1081. }
  1082. }
  1083. @if $focused-background-color != null {
  1084. @if $derive-border-colors and ($focused-border-color == null) {
  1085. $focused-border-color: button-focused-border-color($focused-background-color);
  1086. }
  1087. @if $derive-colors and ($focused-color == null) {
  1088. $focused-color: button-focused-color($focused-background-color, $color);
  1089. }
  1090. @if $derive-background-gradients and ($focused-background-gradient == null) {
  1091. $focused-background-gradient: button-focused-background-gradient($focused-background-color);
  1092. }
  1093. }
  1094. @if $disabled-background-color != null {
  1095. @if $derive-border-colors and ($disabled-border-color == null) {
  1096. $disabled-border-color: button-disabled-border-color($disabled-background-color);
  1097. }
  1098. @if $derive-colors and ($disabled-color == null) {
  1099. $disabled-color: button-disabled-color($disabled-background-color, $color);
  1100. }
  1101. @if $derive-background-gradients and ($disabled-background-gradient == null) {
  1102. $disabled-background-gradient: button-disabled-background-gradient($disabled-background-color);
  1103. }
  1104. }
  1105. @if $derive-outline-colors and ($focused-outline-color == null) {
  1106. $focused-outline-color: button-focused-outline-color($focused-background-color or $background-color, $focused-color or $color);
  1107. }
  1108. @if $derive-icon-colors {
  1109. @if $icon-color == null {
  1110. $icon-color: $color;
  1111. }
  1112. @if $hovered-icon-color == null {
  1113. $hovered-icon-color: $hovered-color;
  1114. }
  1115. @if $pressed-icon-color == null {
  1116. $pressed-icon-color: $pressed-color;
  1117. }
  1118. @if $focused-icon-color == null {
  1119. $focused-icon-color: $focused-color;
  1120. }
  1121. @if $disabled-icon-color == null {
  1122. $disabled-icon-color: $disabled-color;
  1123. }
  1124. }
  1125. @if $derive-arrow-colors {
  1126. @if $arrow-icon-color == null {
  1127. $arrow-icon-color: $color;
  1128. }
  1129. @if $hovered-arrow-icon-color == null {
  1130. $hovered-arrow-icon-color: $hovered-color;
  1131. }
  1132. @if $pressed-arrow-icon-color == null {
  1133. $pressed-arrow-icon-color: $pressed-color;
  1134. }
  1135. @if $focused-arrow-icon-color == null {
  1136. $focused-arrow-icon-color: $focused-color;
  1137. }
  1138. @if $disabled-arrow-icon-color == null {
  1139. $disabled-arrow-icon-color: $disabled-color;
  1140. }
  1141. }
  1142. .#{$prefix}#{$xtype}#{$ui-suffix} {
  1143. color: $color;
  1144. box-shadow: $box-shadow;
  1145. @include font($font-weight, $font-size, $line-height, $font-family);
  1146. border-radius: $border-radius;
  1147. @if $enable-big {
  1148. .#{$prefix}big & {
  1149. font-size: $font-size-big;
  1150. line-height: $line-height-big;
  1151. border-radius: $border-radius-big;
  1152. }
  1153. }
  1154. .#{$prefix}inner-el {
  1155. padding: $icon-only-padding;
  1156. @include border($border-width, $border-style, $border-color);
  1157. @include background-gradient($background-color, $background-gradient);
  1158. border-radius: $border-radius;
  1159. @if $enable-big {
  1160. .#{$prefix}big & {
  1161. padding: $icon-only-padding-big;
  1162. border-radius: $border-radius-big;
  1163. }
  1164. }
  1165. }
  1166. &.#{$prefix}has-text .#{$prefix}inner-el {
  1167. padding: $padding;
  1168. @if $enable-big {
  1169. .#{$prefix}big & {
  1170. padding: $padding-big;
  1171. }
  1172. }
  1173. }
  1174. .#{$prefix}icon-el {
  1175. @include icon(
  1176. $color: $color,
  1177. $size: $icon-size,
  1178. $size-big: $icon-size-big,
  1179. $font-size: $icon-font-size,
  1180. $font-size-big: $icon-font-size-big
  1181. );
  1182. }
  1183. &.#{$prefix}has-text.#{$prefix}icon-align-left .#{$prefix}icon-el {
  1184. margin-right: $icon-horizontal-spacing;
  1185. @if $enable-big {
  1186. .#{$prefix}big & {
  1187. margin-right: $icon-horizontal-spacing-big;
  1188. }
  1189. }
  1190. }
  1191. &.#{$prefix}has-text.#{$prefix}icon-align-right .#{$prefix}icon-el {
  1192. margin-left: $icon-horizontal-spacing;
  1193. @if $enable-big {
  1194. .#{$prefix}big & {
  1195. margin-left: $icon-horizontal-spacing-big;
  1196. }
  1197. }
  1198. }
  1199. &.#{$prefix}has-text.#{$prefix}icon-align-top .#{$prefix}icon-el {
  1200. margin-bottom: $icon-vertical-spacing;
  1201. @if $enable-big {
  1202. .#{$prefix}big & {
  1203. margin-bottom: $icon-vertical-spacing-big;
  1204. }
  1205. }
  1206. }
  1207. &.#{$prefix}has-text.#{$prefix}icon-align-bottom .#{$prefix}icon-el {
  1208. margin-top: $icon-vertical-spacing;
  1209. @if $enable-big {
  1210. .#{$prefix}big & {
  1211. margin-top: $icon-vertical-spacing-big;
  1212. }
  1213. }
  1214. }
  1215. .#{$prefix}arrow-el {
  1216. @include icon(
  1217. $icon: $arrow-icon,
  1218. $color: $arrow-icon-color,
  1219. $size: $arrow-icon-size,
  1220. $size-big: $arrow-icon-size-big,
  1221. $font-size: $arrow-icon-font-size,
  1222. $font-size-big: $arrow-icon-font-size-big
  1223. );
  1224. }
  1225. &.#{$prefix}arrow-align-right .#{$prefix}arrow-el {
  1226. margin-left: $arrow-horizontal-spacing;
  1227. @if $enable-big {
  1228. .#{$prefix}big & {
  1229. margin-left: $arrow-horizontal-spacing-big;
  1230. }
  1231. }
  1232. }
  1233. &.#{$prefix}arrow-align-bottom .#{$prefix}arrow-el {
  1234. margin-top: $arrow-vertical-spacing;
  1235. @if $enable-big {
  1236. .#{$prefix}big & {
  1237. margin-top: $arrow-vertical-spacing-big;
  1238. }
  1239. }
  1240. }
  1241. .#{$prefix}text-el {
  1242. // prevents the button height from shrinking when it has no text
  1243. min-height: $line-height;
  1244. text-transform: $text-transform;
  1245. @if $enable-big {
  1246. .#{$prefix}big & {
  1247. min-height: $line-height-big;
  1248. text-transform: $text-transform-big;
  1249. }
  1250. }
  1251. }
  1252. .#{$prefix}badge-el {
  1253. color: $badge-color;
  1254. border-color: $badge-border-color;
  1255. border-radius: $badge-border-radius;
  1256. min-width: $badge-min-width;
  1257. top: $badge-top;
  1258. right: $badge-right;
  1259. bottom: $badge-bottom;
  1260. left: $badge-left;
  1261. padding: $badge-padding;
  1262. max-width: $badge-max-width;
  1263. @include font($badge-font-weight, $badge-font-size, $badge-line-height, $badge-font-family);
  1264. @if $enable-big {
  1265. .#{$prefix}big & {
  1266. font-size: $badge-font-size-big;
  1267. line-height: $badge-line-height-big;
  1268. }
  1269. }
  1270. @include background-gradient($badge-background-color, $badge-background-gradient);
  1271. }
  1272. &.#{$prefix}hovered {
  1273. color: $hovered-color;
  1274. box-shadow: $hovered-box-shadow;
  1275. .#{$prefix}inner-el {
  1276. border-color: $hovered-border-color;
  1277. @include background-gradient($hovered-background-color, $hovered-background-gradient);
  1278. }
  1279. .#{$prefix}icon-el {
  1280. color: $hovered-icon-color;
  1281. }
  1282. .#{$prefix}arrow-el {
  1283. color: $hovered-arrow-icon-color;
  1284. }
  1285. }
  1286. &:before {
  1287. @if $pressed-box-shadow {
  1288. content: '';
  1289. }
  1290. border-radius: $border-radius;
  1291. box-shadow: $pressed-box-shadow;
  1292. transition: $box-shadow-transition;
  1293. }
  1294. &.#{$prefix}pressing, &.#{$prefix}pressed {
  1295. color: $pressed-color;
  1296. .#{$prefix}keyboard-mode &.#{$prefix}hovered, &.#{$prefix}hovered {
  1297. .#{$prefix}inner-el {
  1298. @include background-gradient($pressed-hovered-background-color, $pressed-hovered-background-gradient);
  1299. }
  1300. }
  1301. .#{$prefix}inner-el, .#{$prefix}keyboard-mode & .#{$prefix}inner-el {
  1302. border-color: $pressed-border-color;
  1303. @include background-gradient($pressed-background-color, $pressed-background-gradient);
  1304. }
  1305. .#{$prefix}icon-el {
  1306. color: $pressed-icon-color;
  1307. }
  1308. .#{$prefix}arrow-el {
  1309. color: $pressed-arrow-icon-color;
  1310. }
  1311. }
  1312. .#{$prefix}keyboard-mode &.#{$prefix}focused.#{$prefix}hovered .#{$prefix}inner-el {
  1313. @include background-gradient($focused-hovered-background-color, $focused-hovered-background-gradient);
  1314. }
  1315. .#{$prefix}keyboard-mode &.#{$prefix}focused {
  1316. color: $focused-color;
  1317. box-shadow: $focused-box-shadow;
  1318. .#{$prefix}inner-el {
  1319. border-color: $focused-border-color;
  1320. @include background-gradient($focused-background-color, $focused-background-gradient);
  1321. }
  1322. .#{$prefix}icon-el {
  1323. color: $focused-icon-color;
  1324. }
  1325. .#{$prefix}arrow-el {
  1326. color: $focused-arrow-icon-color;
  1327. }
  1328. &:after {
  1329. // This is a pseudo element for simulating a focus outline.
  1330. // We can't use regular css outline because it does not support radius.
  1331. // We also can't simulate an outline using box-shadow because buttons may
  1332. // already have a box-shadow configured using the $button-shadow var.
  1333. @if $focused-outline-offset != null {
  1334. margin-top: -$focused-outline-offset;
  1335. margin-right: -$focused-outline-offset;
  1336. margin-left: -$focused-outline-offset;
  1337. margin-bottom: -$focused-outline-offset;
  1338. }
  1339. @include border($focused-outline-width, $focused-outline-style, $focused-outline-color);
  1340. border-radius: $border-radius;
  1341. @if $enable-big {
  1342. .#{$prefix}big & {
  1343. border-radius: $border-radius-big;
  1344. }
  1345. }
  1346. }
  1347. }
  1348. &.#{$prefix}disabled {
  1349. opacity: $disabled-opacity;
  1350. color: $disabled-color;
  1351. box-shadow: $disabled-box-shadow;
  1352. .#{$prefix}inner-el {
  1353. border-color: $disabled-border-color;
  1354. @include background-gradient($disabled-background-color, $disabled-background-gradient);
  1355. }
  1356. .#{$prefix}icon-el {
  1357. color: $disabled-icon-color;
  1358. }
  1359. .#{$prefix}arrow-el {
  1360. color: $disabled-arrow-icon-color;
  1361. }
  1362. }
  1363. }
  1364. }
  1365. /**
  1366. * Creates a theme UI for buttons.
  1367. * Also automatically generates UIs for {ui-label}-round and {ui-label}-small.
  1368. *
  1369. * // SCSS
  1370. * @include sencha-button-ui('secondary', #99A4AE, 'glossy');
  1371. *
  1372. * // JS
  1373. * var cancelBtn = new Ext.Button({text: 'Cancel', ui: 'secondary'});
  1374. *
  1375. * @param {string} $ui-label The name of the UI being created.
  1376. * Can not included spaces or special punctuation (used in class names)
  1377. * @param {color} $color Base color for the UI.
  1378. * @param {string} $gradient Default gradient for the UI.
  1379. *
  1380. * @member Ext.Button
  1381. * @deprecated 6.0 Use {@link #button-ui} instead
  1382. */
  1383. @mixin sencha-button-ui(
  1384. $ui-label,
  1385. $color,
  1386. $gradient: $button-background-gradient
  1387. ) {
  1388. @include button-ui(
  1389. $ui: $ui-label,
  1390. $background-color: $color,
  1391. $background-gradient: $gradient
  1392. );
  1393. }
  1394. /**
  1395. * alt uis + decline/confirm have some magic to swap foreground and background colors.
  1396. * this creates a "alt decline" and "alt confirm".
  1397. * @private
  1398. */
  1399. @mixin button-alt-invert-ui($ui, $ui-selector) {
  1400. $background-color: map_get($ui, 'color');
  1401. $color: map_get($ui, 'background-color');
  1402. @if $color == null {
  1403. $color: map_get($button-alt-ui, 'color');
  1404. }
  1405. .#{$prefix}button-alt.#{$ui-selector} {
  1406. color: $color;
  1407. .#{$prefix}inner-el {
  1408. background-color: $background-color;
  1409. }
  1410. .#{$prefix}icon-el {
  1411. color: $color;
  1412. }
  1413. &.#{$prefix}hovered {
  1414. color: $color;
  1415. .#{$prefix}inner-el {
  1416. background-color: $background-color;
  1417. }
  1418. .#{$prefix}icon-el {
  1419. color: $color;
  1420. }
  1421. }
  1422. &.#{$prefix}pressing, &.#{$prefix}pressed {
  1423. color: $color;
  1424. .#{$prefix}inner-el {
  1425. background-color: $background-color;
  1426. }
  1427. .#{$prefix}icon-el {
  1428. color: $color;
  1429. }
  1430. }
  1431. &.#{$prefix}focused {
  1432. .#{$prefix}keyboard-mode & {
  1433. color: $color;
  1434. .#{$prefix}inner-el {
  1435. background-color: $background-color;
  1436. }
  1437. .#{$prefix}icon-el {
  1438. color: $color;
  1439. }
  1440. }
  1441. }
  1442. }
  1443. }
  1444. @if ($enable-inverted-alt-button) {
  1445. @include button-alt-invert-ui($button-decline-ui, #{$prefix}button-decline);
  1446. @include button-alt-invert-ui($button-confirm-ui, #{$prefix}button-confirm);
  1447. }