SplitButton.scss 46 KB

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