Menu.scss 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  1. /**
  2. * @class Ext.menu.Menu
  3. */
  4. /**
  5. * @var {color}
  6. * The background-color of the Menu
  7. */
  8. $menu-background-color: dynamic(#fff);
  9. /**
  10. * @var {color}
  11. * The border-color of the Menu
  12. */
  13. $menu-border-color: dynamic($neutral-color);
  14. /**
  15. * @var {string}
  16. * The border-style of the Menu
  17. */
  18. $menu-border-style: dynamic(solid);
  19. /**
  20. * @var {number}
  21. * The border-width of the Menu
  22. */
  23. $menu-border-width: dynamic(1px);
  24. /**
  25. * @var {number/list}
  26. * The padding to apply to the Menu body element
  27. */
  28. $menu-padding: dynamic(2px);
  29. /**
  30. * @var {color}
  31. * The color of Menu Item text
  32. */
  33. $menu-text-color: dynamic(#000);
  34. /**
  35. * @var {string}
  36. * The font-family of {@link Ext.menu.Item Menu Items}
  37. */
  38. $menu-item-font-family: dynamic($font-family);
  39. /**
  40. * @var {number}
  41. * The font-size of {@link Ext.menu.Item Menu Items}
  42. */
  43. $menu-item-font-size: dynamic($font-size);
  44. /**
  45. * @var {string}
  46. * The font-weight of {@link Ext.menu.Item Menu Items}
  47. */
  48. $menu-item-font-weight: dynamic($font-weight);
  49. /**
  50. * @var {number}
  51. * The height of {@link Ext.menu.Item Menu Items}
  52. */
  53. $menu-item-height: dynamic(24px);
  54. /**
  55. * @var {number}
  56. * The border-width of {@link Ext.menu.Item Menu Items}
  57. */
  58. $menu-item-border-width: dynamic(1px);
  59. /**
  60. * @var {string}
  61. * The style of cursor to display when the cursor is over a {@link Ext.menu.Item Menu Item}
  62. */
  63. $menu-item-cursor: dynamic(pointer);
  64. /**
  65. * @var {string}
  66. * The style of cursor to display when the cursor is over a disabled {@link Ext.menu.Item Menu Item}
  67. */
  68. $menu-item-disabled-cursor: dynamic(default);
  69. /**
  70. * @var {color}
  71. * The text color of the active {@link Ext.menu.Item Menu Item}
  72. */
  73. $menu-item-active-text-color: dynamic($color);
  74. /**
  75. * @var {color}
  76. * The background-color of the active {@link Ext.menu.Item Menu Item}
  77. */
  78. $menu-item-active-background-color: dynamic($base-color);
  79. /**
  80. * @var {color}
  81. * The border-color of the active {@link Ext.menu.Item Menu Item}
  82. */
  83. $menu-item-active-border-color: dynamic(adjust-color($base-color, $saturation: 23%, $lightness: -3%));
  84. /**
  85. * @var {string/list}
  86. * The background-gradient for {@link Ext.menu.Item Menu Items}. Can be either the name
  87. * of a predefined gradient or a list of color stops. Used as the `$type` parameter for
  88. * {@link Global_CSS#background-gradient}.
  89. */
  90. $menu-item-background-gradient: dynamic('none');
  91. /**
  92. * @var {number}
  93. * The border-radius of {@link Ext.menu.Item Menu Items}
  94. */
  95. $menu-item-active-border-radius: dynamic(0);
  96. /**
  97. * @var {number}
  98. * The size of {@link Ext.menu.Item Menu Item} icons
  99. */
  100. $menu-item-icon-size: dynamic(16px);
  101. /**
  102. * @var {color} $menu-glyph-color
  103. * The color to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  104. */
  105. $menu-glyph-color: dynamic($menu-text-color);
  106. /**
  107. * @var {string}
  108. * The font-size to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  109. */
  110. $menu-glyph-font-size: dynamic($menu-item-icon-size);
  111. /**
  112. * @var {number} $menu-glyph-opacity
  113. * The opacity to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  114. */
  115. $menu-glyph-opacity: dynamic(.5);
  116. /**
  117. * @var {color}
  118. * The color to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  119. * when the menu item is active.
  120. */
  121. $menu-item-active-glyph-color: dynamic($menu-glyph-color);
  122. /**
  123. * @var {number}
  124. * The size of {@link Ext.menu.CheckItem CheckItem} checkboxes
  125. */
  126. $menu-item-checkbox-size: dynamic($menu-item-icon-size);
  127. /**
  128. * @var {number}
  129. * The size of {@link Ext.menu.CheckItem CheckItem} checkboxes
  130. */
  131. $menu-item-checkbox-glyph-font-size: dynamic($form-checkbox-size);
  132. /**
  133. * @var {string/list}
  134. * The glyph for {@link Ext.menu.CheckItem CheckItem} checkboxes when
  135. * {@link Global_CSS#$enable-font-icons} is `true`.
  136. */
  137. $menu-item-checkbox-glyph: dynamic($fa-var-square-o $menu-item-checkbox-glyph-font-size $font-icon-font-family);
  138. /**
  139. * @var {string/list}
  140. * The glyph for {@link Ext.menu.CheckItem CheckItem} checkboxes in "checked" state when
  141. * {@link Global_CSS#$enable-font-icons} is `true`.
  142. */
  143. $menu-item-checkbox-checked-glyph: dynamic($fa-var-check-square-o $menu-item-checkbox-glyph-font-size $font-icon-font-family);
  144. /**
  145. * @var {color}
  146. * The color of {@link Ext.menu.CheckItem CheckItem} checkboxes when {@link Global_CSS#$enable-font-icons} is `true`.
  147. */
  148. $menu-item-checkbox-glyph-color: dynamic($menu-text-color);
  149. /**
  150. * @var {color}
  151. * The color of the {@link Ext.menu.CheckItem CheckItem} checkbox for the active menu item
  152. * when {@link Global_CSS#$enable-font-icons} is `true`.
  153. */
  154. $menu-item-active-checkbox-glyph-color: dynamic($menu-item-active-text-color);
  155. /**
  156. * @var {string/list}
  157. * The glyph for {@link Ext.menu.CheckItem CheckItem} group checkboxes when
  158. * {@link Global_CSS#$enable-font-icons} is `true`.
  159. */
  160. $menu-item-checkbox-group-glyph: dynamic(null);
  161. /**
  162. * @var {string/list}
  163. * The glyph for {@link Ext.menu.CheckItem CheckItem} group checkboxes in "checked" state when
  164. * {@link Global_CSS#$enable-font-icons} is `true`.
  165. */
  166. $menu-item-checkbox-group-checked-glyph: dynamic($fa-var-check $menu-item-checkbox-glyph-font-size $font-icon-font-family);
  167. /**
  168. * @var {color}
  169. * The color of {@link Ext.menu.CheckItem CheckItem} group checkboxes when
  170. * {@link Global_CSS#$enable-font-icons} is `true`.
  171. */
  172. $menu-item-checkbox-group-glyph-color: dynamic($menu-item-checkbox-glyph-color);
  173. /**
  174. * @var {color}
  175. * The color of the {@link Ext.menu.CheckItem CheckItem} group checkbox for the active menu item
  176. * when {@link Global_CSS#$enable-font-icons} is `true`.
  177. */
  178. $menu-item-active-checkbox-group-glyph-color: dynamic($menu-item-active-checkbox-glyph-color);
  179. /**
  180. * @var {list}
  181. * The background-position of {@link Ext.menu.Item Menu Item} icons
  182. */
  183. $menu-item-icon-background-position: dynamic(center center);
  184. /**
  185. * @var {number}
  186. * vertical offset for menu item icons/checkboxes. By default the icons are roughly
  187. * vertically centered, but it may be necessary in some cases to make minor adjustments
  188. * to the vertical position.
  189. */
  190. $menu-item-icon-vertical-offset: dynamic(0);
  191. /**
  192. * @var {number}
  193. * vertical offset for menu item text. By default the text is given a line-height
  194. * equal to the menu item's content-height, however, depending on the font this may not
  195. * result in perfect vertical centering. Offset can be used to make small adjustments
  196. * to the text's vertical position.
  197. */
  198. $menu-item-text-vertical-offset: dynamic(0);
  199. /**
  200. * @var {number/list}
  201. * The space to the left and right of {@link Ext.menu.Item Menu Item} text. Can be specified
  202. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  203. *
  204. * $menu-item-text-horizontal-spacing: dynamic(4px 8px); // 4px of space to the left, and 8px to the right
  205. */
  206. $menu-item-text-horizontal-spacing: dynamic(4px);
  207. /**
  208. * @var {number}
  209. * The space to the left and right of {@link Ext.menu.Item Menu Item} icons. Can be specified
  210. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  211. *
  212. * $menu-item-icon-horizontal-spacing: dynamic(4px 8px); // 4px of space to the left, and 8px to the right
  213. */
  214. $menu-item-icon-horizontal-spacing: dynamic(3px 10px);
  215. /**
  216. * @var {number}
  217. * The space to the left and right of {@link Ext.menu.Item Menu Item} arrows. Can be specified
  218. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  219. *
  220. * $menu-item-arrow-horizontal-spacing: dynamic(4px 8px); // 4px of space to the left, and 8px to the right
  221. */
  222. $menu-item-arrow-horizontal-spacing: dynamic(5px 0);
  223. /**
  224. * @var {number}
  225. * The space to the left and right of the {@link Ext.menu.Bar Menu item} arrows. Can be specified
  226. * as a number or as a list with 2 values.
  227. */
  228. $menubar-item-arrow-horizontal-spacing: dynamic(5px 5px);
  229. /**
  230. * @var {number/list}
  231. * The margin of {@link Ext.menu.Separator Menu Separators}
  232. */
  233. $menu-item-separator-margin: dynamic(2px 0);
  234. /**
  235. * @var {number}
  236. * The height of {@link Ext.menu.Item Menu Item} arrows
  237. */
  238. $menu-item-arrow-height: dynamic(9px);
  239. /**
  240. * @var {number}
  241. * Vertical offset for arrow el.
  242. * @private
  243. */
  244. $menubar-item-arrow-vertical-offset: dynamic(round($menubar-item-arrow-height / 2));
  245. /**
  246. * @var {number}
  247. * The width of {@link Ext.menu.Item Menu Item} arrows
  248. */
  249. $menu-item-arrow-width: dynamic(12px);
  250. /**
  251. * @var {number}
  252. * The height of the {@link Ext.menu.Bar Menu item} arrows
  253. */
  254. $menubar-item-arrow-height: dynamic(6px);
  255. /**
  256. * @var {number}
  257. * The width of the {@link Ext.menu.Bar Menu item} arrows
  258. */
  259. $menubar-item-arrow-width: dynamic(9px);
  260. /**
  261. * @var {number/list}
  262. * The margin of {@link Ext.menu.Item Menu Item} arrows
  263. */
  264. $menu-item-arrow-margin: dynamic(null);
  265. /**
  266. * @var {color}
  267. * The color to use for the menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  268. */
  269. $menu-item-arrow-glyph-color: dynamic($color);
  270. /**
  271. * @var {color}
  272. * The color to use for the menu arrow icon of the active menu item when
  273. * {@link Global_CSS#$enable-font-icons} is `true`.
  274. */
  275. $menu-item-active-arrow-glyph-color: dynamic($menu-item-active-text-color);
  276. /**
  277. * @var {number}
  278. * The font size to use for the menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  279. */
  280. $menu-item-arrow-glyph-font-size: dynamic(16px);
  281. /**
  282. * @var {string/list}
  283. * Glyph for the menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  284. */
  285. $menu-item-arrow-glyph: dynamic($fa-var-caret-right $menu-item-arrow-glyph-font-size $font-icon-font-family);
  286. /**
  287. * @var {string/list}
  288. * Glyph for the RTL menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  289. */
  290. $menu-item-arrow-glyph-rtl: dynamic($fa-var-caret-left $menu-item-arrow-glyph-font-size $font-icon-font-family);
  291. /**
  292. * @var {string/list}
  293. * Glyph for the menu bar item arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  294. */
  295. $menubar-item-arrow-glyph: dynamic($fa-var-caret-down $menu-item-arrow-glyph-font-size $font-icon-font-family);
  296. /**
  297. * @var {string/list}
  298. * Glyph for the RTL menu bar item arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  299. */
  300. $menubar-item-arrow-glyph-rtl: dynamic($fa-var-caret-down $menu-item-arrow-glyph-font-size $font-icon-font-family);
  301. /**
  302. * @var {number}
  303. * The opacity of disabled {@link Ext.menu.Item Menu Items}
  304. */
  305. $menu-item-disabled-opacity: dynamic(.5);
  306. /**
  307. * @var {number/list}
  308. * The margin non-MenuItems placed in a Menu
  309. */
  310. $menu-component-margin: dynamic(0);
  311. /**
  312. * @var {color}
  313. * The border-color of {@link Ext.menu.Separator Menu Separators}
  314. */
  315. $menu-separator-border-color: dynamic($neutral-color);
  316. /**
  317. * @var {color}
  318. * The background-color of {@link Ext.menu.Separator Menu Separators}
  319. */
  320. $menu-separator-background-color: dynamic(#FFF);
  321. /**
  322. * @var {number}
  323. * The size of {@link Ext.menu.Separator Menu Separators}
  324. */
  325. $menu-separator-size: dynamic(2px);
  326. /**
  327. * @var {number}
  328. * The width of Menu scrollers
  329. */
  330. $menu-scroller-width: dynamic(16px);
  331. /**
  332. * @var {number}
  333. * The height of Menu scrollers
  334. */
  335. $menu-scroller-height: dynamic(16px);
  336. /**
  337. * @var {color}
  338. * The border-color of Menu scroller buttons
  339. */
  340. $menu-scroller-border-color: dynamic($neutral-color);
  341. /**
  342. * @var {number}
  343. * The border-width of Menu scroller buttons
  344. */
  345. $menu-scroller-border-width: dynamic(0);
  346. /**
  347. * @var {number/list}
  348. * The margin of "top" Menu scroller buttons
  349. */
  350. $menu-scroller-top-margin: dynamic(4px 0);
  351. /**
  352. * @var {number/list}
  353. * The margin of "bottom" Menu scroller buttons
  354. */
  355. $menu-scroller-bottom-margin: dynamic(4px 0);
  356. /**
  357. * @var {string}
  358. * The cursor of Menu scroller buttons
  359. */
  360. $menu-scroller-cursor: dynamic(pointer);
  361. /**
  362. * @var {string}
  363. * The cursor of disabled Menu scroller buttons
  364. */
  365. $menu-scroller-cursor-disabled: dynamic(default);
  366. /**
  367. * @var {number}
  368. * The opacity of Menu scroller buttons. Only applicable when
  369. * {@link #$menu-classic-scrollers} is `false`.
  370. */
  371. $menu-scroller-opacity: dynamic(0.5);
  372. /**
  373. * @var {number}
  374. * The opacity of hovered Menu scroller buttons. Only applicable when
  375. * {@link #$menu-classic-scrollers} is `false`.
  376. */
  377. $menu-scroller-opacity-over: dynamic(0.6);
  378. /**
  379. * @var {number}
  380. * The opacity of pressed Menu scroller buttons. Only applicable when
  381. * {@link #$menu-classic-scrollers} is `false`.
  382. */
  383. $menu-scroller-opacity-pressed: dynamic(0.7);
  384. /**
  385. * @var {number}
  386. * The opacity of disabled Menu scroller buttons.
  387. */
  388. $menu-scroller-opacity-disabled: dynamic(0.25);
  389. /**
  390. * @var {color}
  391. * The color to use for Menu scroller icons when {@link Global_CSS#$enable-font-icons} is `true`.
  392. */
  393. $menu-scroller-glyph-color: dynamic($neutral-color);
  394. /**
  395. * @var {number}
  396. * The font size for Menu scroller icons when {@link Global_CSS#$enable-font-icons} is `true`.
  397. */
  398. $menu-scroller-glyph-font-size: dynamic(16px);
  399. /**
  400. * @var {string/list}
  401. * Glyph for the "top" scroller icon when {@link Global_CSS#$enable-font-icons} is `true`.
  402. */
  403. $menu-scroller-top-glyph: dynamic($fa-var-chevron-up $menu-scroller-glyph-font-size $font-icon-font-family);
  404. /**
  405. * @var {string/list}
  406. * Glyph for the "bottom" scroller icon when {@link Global_CSS#$enable-font-icons} is `true`.
  407. */
  408. $menu-scroller-bottom-glyph: dynamic($fa-var-chevron-down $menu-scroller-glyph-font-size $font-icon-font-family);
  409. /**
  410. * @var {boolean}
  411. * `true` to use classic-style scroller buttons. When `true` scroller buttons are given their
  412. * hover state by changing their background-position, When `false` scroller buttons are
  413. * given their hover state by applying opacity.
  414. */
  415. $menu-classic-scrollers: dynamic(false);
  416. /**
  417. * @var {boolean}
  418. * True to include the "default" menu UI
  419. */
  420. $include-menu-default-ui: dynamic($include-default-uis);
  421. /**
  422. * Creates a visual theme for a Menu.
  423. *
  424. * @param {string} $ui
  425. * The name of the UI being created. Can not included spaces or special punctuation
  426. * (used in CSS class names).
  427. *
  428. * @param {color} [$ui-background-color=$menu-background-color]
  429. * The background-color of the Menu
  430. *
  431. * @param {color} [$ui-border-color=$menu-border-color]
  432. * The border-color of the Menu
  433. *
  434. * @param {string} [$ui-border-style=$menu-border-style]
  435. * The border-style of the Menu
  436. *
  437. * @param {number} [$ui-border-width=$menu-border-width]
  438. * The border-width of the Menu
  439. *
  440. * @param {number/list} [$ui-padding=$menu-padding]
  441. * The padding to apply to the Menu body element
  442. *
  443. * @param {color} [$ui-text-color=$menu-text-color]
  444. * The color of Menu Item text
  445. *
  446. * @param {string} [$ui-item-font-family=$menu-item-font-family]
  447. * The font-family of {@link Ext.menu.Item Menu Items}
  448. *
  449. * @param {number} [$ui-item-font-size=$menu-item-font-size]
  450. * The font-size of {@link Ext.menu.Item Menu Items}
  451. *
  452. * @param {string} [$ui-item-font-weight=$menu-item-font-weight]
  453. * The font-weight of {@link Ext.menu.Item Menu Items}
  454. *
  455. * @param {number} [$ui-item-height=$menu-item-height]
  456. * The height of {@link Ext.menu.Item Menu Items}
  457. *
  458. * @param {number} [$ui-item-border-width=$menu-item-border-width]
  459. * The border-width of {@link Ext.menu.Item Menu Items}
  460. *
  461. * @param {string} [$ui-item-cursor=$menu-item-cursor]
  462. * The style of cursor to display when the cursor is over a {@link Ext.menu.Item Menu Item}
  463. *
  464. * @param {string} [$ui-item-disabled-cursor=$menu-item-disabled-cursor]
  465. * The style of cursor to display when the cursor is over a disabled {@link Ext.menu.Item Menu Item}
  466. *
  467. * @param {color} [$ui-item-active-text-color=$menu-item-active-text-color]
  468. * The text color of the active {@link Ext.menu.Item Menu Item}
  469. *
  470. * @param {color} [$ui-item-active-background-color=$menu-item-active-background-color]
  471. * The background-color of the active {@link Ext.menu.Item Menu Item}
  472. *
  473. * @param {color} [$ui-item-active-border-color=$menu-item-active-border-color]
  474. * The border-color of the active {@link Ext.menu.Item Menu Item}
  475. *
  476. * @param {string/list} [$ui-item-background-gradient=$menu-item-background-gradient]
  477. * The background-gradient for {@link Ext.menu.Item Menu Items}. Can be either the name
  478. * of a predefined gradient or a list of color stops. Used as the `$type` parameter for
  479. * {@link Global_CSS#background-gradient}.
  480. *
  481. * @param {number} [$ui-item-active-border-radius=$menu-item-active-border-radius]
  482. * The border-radius of {@link Ext.menu.Item Menu Items}
  483. *
  484. * @param {number} [$ui-item-icon-size=$menu-item-icon-size]
  485. * The size of {@link Ext.menu.Item Menu Item} icons
  486. *
  487. * @param {color} [$ui-glyph-color=$menu-glyph-color]
  488. * The color to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  489. *
  490. * @param {string} [$ui-glyph-font-size=$menu-glyph-font-size]
  491. * The font-size to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  492. *
  493. * @param {number} [$ui-glyph-opacity=$menu-glyph-opacity]
  494. * The opacity to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  495. *
  496. * @param {color} [$ui-item-active-glyph-color=$menu-item-active-glyph-color]
  497. * The color to use for menu icons configured using {@link Ext.menu.Item#glyph glyph}
  498. * when the menu item is active.
  499. *
  500. * @param {number} [$ui-item-checkbox-size=$menu-item-checkbox-size]
  501. * The size of {@link Ext.menu.Item Menu Item} checkboxes
  502. *
  503. * @param {string/list} [$ui-item-checkbox-glyph=$menu-item-checkbox-glyph]
  504. * The glyph for {@link Ext.menu.CheckItem CheckItem} checkboxes when
  505. * {@link Global_CSS#$enable-font-icons} is `true`.
  506. *
  507. * @param {string/list} [$ui-item-checkbox-checked-glyph=$menu-item-checkbox-checked-glyph]
  508. * The glyph for {@link Ext.menu.CheckItem CheckItem} checkboxes in "checked" state when
  509. * {@link Global_CSS#$enable-font-icons} is `true`.
  510. *
  511. * @param {color} [$ui-item-checkbox-glyph-color=$menu-item-checkbox-glyph-color]
  512. * The color of the glyph for grouped checkboxes.
  513. *
  514. * @param {string/list} [$ui-item-checkbox-group-glyph=$menu-item-checkbox-group-glyph]
  515. * The glyph for grouped checkboxes.
  516. *
  517. * @param {string/list} [$ui-item-checkbox-group-checked-glyph=$menu-item-checkbox-group-checked-glyph]
  518. * The glyph for checked grouped checkboxes.
  519. *
  520. * @param {color} [$ui-item-checkbox-group-glyph-color=$menu-item-checkbox-group-glyph-color]
  521. * The color of the glyph for checked grouped checkboxes.
  522. *
  523. * @param {color} [$ui-item-active-checkbox-group-glyph-color=$menu-item-checkbox-glyph-color]
  524. * The color of {@link Ext.menu.CheckItem CheckItem} checkboxes when {@link Global_CSS#$enable-font-icons} is `true`.
  525. *
  526. * @param {color} [$ui-item-active-checkbox-glyph-color=$menu-item-active-checkbox-glyph-color]
  527. * The color of the {@link Ext.menu.CheckItem CheckItem} checkbox for the active menu item
  528. * when {@link Global_CSS#$enable-font-icons} is `true`.*
  529. *
  530. * @param {list} [$ui-item-icon-background-position=$menu-item-icon-background-position]
  531. * The background-position of {@link Ext.menu.Item Menu Item} icons
  532. *
  533. * @param {number} [$ui-item-icon-vertical-offset=$menu-item-icon-vertical-offset]
  534. * vertical offset for menu item icons/checkboxes. By default the icons are roughly
  535. * vertically centered, but it may be necessary in some cases to make minor adjustments
  536. * to the vertical position.
  537. *
  538. * @param {number} [$ui-item-text-vertical-offset=$menu-item-text-vertical-offset]
  539. * vertical offset for menu item text. By default the text is given a line-height
  540. * equal to the menu item's content-height, however, depending on the font this may not
  541. * result in perfect vertical centering. Offset can be used to make small adjustments
  542. * to the text's vertical position.
  543. *
  544. * @param {number/list} [$ui-item-text-horizontal-spacing=$menu-item-text-horizontal-spacing]
  545. * The space to the left and right of {@link Ext.menu.Item Menu Item} text. Can be specified
  546. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  547. *
  548. * $menu-item-text-horizontal-spacing: 4px 8px !default; // 4px of space to the left, and 8px to the right
  549. *
  550. * @param {number} [$ui-item-icon-horizontal-spacing=$menu-item-icon-horizontal-spacing]
  551. * The space to the left and right of {@link Ext.menu.Item Menu Item} icons. Can be specified
  552. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  553. *
  554. * $menu-item-icon-horizontal-spacing: 4px 8px !default; // 4px of space to the left, and 8px to the right
  555. *
  556. * @param {number} [$ui-item-arrow-horizontal-spacing=$menu-item-arrow-horizontal-spacing]
  557. * The space to the left and right of {@link Ext.menu.Item Menu Item} arrows. Can be specified
  558. * as a number (e.g. 5px) or as a list with 2 items for different left/right values. e.g.
  559. *
  560. * $menu-item-arrow-horizontal-spacing: 4px 8px !default; // 4px of space to the left, and 8px to the right
  561. *
  562. * @param {number/list} [$ui-item-separator-margin=$menu-item-separator-margin]
  563. * The margin of {@link Ext.menu.Separator Menu Separators}
  564. *
  565. * @param {number} [$ui-item-arrow-height=$menu-item-arrow-height]
  566. * The height of {@link Ext.menu.Item Menu Item} arrows
  567. *
  568. * @param {number} [$ui-item-arrow-width=$menu-item-arrow-width]
  569. * The width of {@link Ext.menu.Item Menu Item} arrows
  570. *
  571. * @param {number} [$ui-item-arrow-margin=$menu-item-arrow-margin]
  572. * The margin of {@link Ext.menu.Item Menu Item} arrows
  573. *
  574. * @param {color} [$ui-item-arrow-glyph-color=$menu-item-arrow-glyph-color]
  575. * The color to use for the menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  576. *
  577. * @param {color} [$ui-item-active-arrow-glyph-color=$menu-item-active-arrow-glyph-color]
  578. * The color to use for the menu arrow icon of the active menu item when
  579. * {@link Global_CSS#$enable-font-icons} is `true`.
  580. *
  581. * @param {string/list} [$ui-item-arrow-glyph=$menu-item-arrow-glyph]
  582. * Glyph for the menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  583. *
  584. * @param {string/list} [$ui-item-arrow-glyph-rtl=$menu-item-arrow-glyph-rtl]
  585. * Glyph for the rtl menu arrow icon when {@link Global_CSS#$enable-font-icons} is `true`.
  586. *
  587. * @param {number} [$ui-item-disabled-opacity=$menu-item-disabled-opacity]
  588. * The opacity of disabled {@link Ext.menu.Item Menu Items}
  589. *
  590. * @param {number/list} [$ui-component-margin=$menu-component-margin]
  591. * The margin non-MenuItems placed in a Menu
  592. *
  593. * @param {color} [$ui-separator-border-color=$menu-separator-border-color]
  594. * The border-color of {@link Ext.menu.Separator Menu Separators}
  595. *
  596. * @param {color} [$ui-separator-background-color=$menu-separator-background-color]
  597. * The background-color of {@link Ext.menu.Separator Menu Separators}
  598. *
  599. * @param {number} [$ui-separator-size=$menu-separator-size]
  600. * The size of {@link Ext.menu.Separator Menu Separators}
  601. *
  602. * @param {number} [$ui-scroller-width=$menu-scroller-width]
  603. * The width of Menu scrollers
  604. *
  605. * @param {number} [$ui-scroller-height=$menu-scroller-height]
  606. * The height of Menu scrollers
  607. *
  608. * @param {color} [$ui-scroller-border-color=$menu-scroller-border-color]
  609. * The border-color of Menu scroller buttons
  610. *
  611. * @param {number} [$ui-scroller-border-width=$menu-scroller-border-width]
  612. * The border-width of Menu scroller buttons
  613. *
  614. * @param {number/list} [$ui-scroller-top-margin=$menu-scroller-top-margin]
  615. * The margin of "top" Menu scroller buttons
  616. *
  617. * @param {number/list} [$ui-scroller-bottom-margin=$menu-scroller-bottom-margin]
  618. * The margin of "bottom" Menu scroller buttons
  619. *
  620. * @param {string} [$ui-scroller-cursor=$menu-scroller-cursor]
  621. * The cursor of Menu scroller buttons
  622. *
  623. * @param {string} [$ui-scroller-cursor-disabled=$menu-scroller-cursor-disabled]
  624. * The cursor of disabled Menu scroller buttons
  625. *
  626. * @param {number} [$ui-scroller-opacity=$menu-scroller-opacity]
  627. * The opacity of Menu scroller buttons. Only applicable when
  628. * {@link #$menu-classic-scrollers} is `false`.
  629. *
  630. * @param {number} [$ui-scroller-opacity-over=$menu-scroller-opacity-over]
  631. * The opacity of hovered Menu scroller buttons. Only applicable when
  632. * {@link #$menu-classic-scrollers} is `false`.
  633. *
  634. * @param {number} [$ui-scroller-opacity-pressed=$menu-scroller-opacity-pressed]
  635. * The opacity of pressed Menu scroller buttons. Only applicable when
  636. * {@link #$menu-classic-scrollers} is `false`.
  637. *
  638. * @param {number} [$ui-scroller-opacity-disabled=$menu-scroller-opacity-disabled]
  639. * The opacity of disabled Menu scroller buttons.
  640. *
  641. * @param {color} [$ui-scroller-glyph-color=$menu-scroller-glyph-color]
  642. * The color to use for Menu scroller icons when {@link Global_CSS#$enable-font-icons} is `true`.
  643. *
  644. * @param {string/list} [$ui-scroller-top-glyph=$menu-scroller-top-glyph]
  645. * Glyph for the "top" scroller icon when {@link Global_CSS#$enable-font-icons} is `true`.
  646. *
  647. * @param {string/list} [$ui-scroller-bottom-glyph=$menu-scroller-bottom-glyph]
  648. * Glyph for the "bottom" scroller icon when {@link Global_CSS#$enable-font-icons} is `true`.
  649. *
  650. * @param {boolean} [$ui-classic-scrollers=$menu-classic-scrollers]
  651. * `true` to use classic-style scroller buttons. When `true` scroller buttons are given their
  652. * hover state by changing their background-position, When `false` scroller buttons are
  653. * given their hover state by applying opacity.
  654. *
  655. * @param {number} [$ui-item-arrow-top-offset=0]
  656. *
  657. * @member Ext.menu.Menu
  658. */
  659. @mixin extjs-menu-ui(
  660. $ui,
  661. $ui-background-color: $menu-background-color,
  662. $ui-border-color: $menu-border-color,
  663. $ui-border-style: $menu-border-style,
  664. $ui-border-width: $menu-border-width,
  665. $ui-padding: $menu-padding,
  666. $ui-text-color: $menu-text-color,
  667. $ui-item-font-family: $menu-item-font-family,
  668. $ui-item-font-size: $menu-item-font-size,
  669. $ui-item-font-weight: $menu-item-font-weight,
  670. $ui-item-height: $menu-item-height,
  671. $ui-item-border-width: $menu-item-border-width,
  672. $ui-item-cursor: $menu-item-cursor,
  673. $ui-item-disabled-cursor: $menu-item-disabled-cursor,
  674. $ui-item-active-text-color: $menu-item-active-text-color,
  675. $ui-item-active-background-color: $menu-item-active-background-color,
  676. $ui-item-active-border-color: $menu-item-active-border-color,
  677. $ui-item-background-gradient: $menu-item-background-gradient,
  678. $ui-item-active-border-radius: $menu-item-active-border-radius,
  679. $ui-item-icon-size: $menu-item-icon-size,
  680. $ui-glyph-color: $menu-glyph-color,
  681. $ui-glyph-font-size: $menu-glyph-font-size,
  682. $ui-glyph-opacity: $menu-glyph-opacity,
  683. $ui-item-active-glyph-color: $menu-item-active-glyph-color,
  684. $ui-item-checkbox-size: $menu-item-checkbox-size,
  685. $ui-item-checkbox-glyph: $menu-item-checkbox-glyph,
  686. $ui-item-checkbox-checked-glyph: $menu-item-checkbox-checked-glyph,
  687. $ui-item-checkbox-glyph-color: $menu-item-checkbox-glyph-color,
  688. $ui-item-checkbox-group-glyph: $menu-item-checkbox-group-glyph,
  689. $ui-item-checkbox-group-checked-glyph: $menu-item-checkbox-group-checked-glyph,
  690. $ui-item-checkbox-group-glyph-color: $menu-item-checkbox-group-glyph-color,
  691. $ui-item-active-checkbox-group-glyph-color: $menu-item-active-checkbox-group-glyph-color,
  692. $ui-item-active-checkbox-glyph-color: $menu-item-active-checkbox-glyph-color,
  693. $ui-item-icon-background-position: $menu-item-icon-background-position,
  694. $ui-item-icon-vertical-offset: $menu-item-icon-vertical-offset,
  695. $ui-item-text-vertical-offset: $menu-item-text-vertical-offset,
  696. $ui-item-text-horizontal-spacing: $menu-item-text-horizontal-spacing,
  697. $ui-item-icon-horizontal-spacing: $menu-item-icon-horizontal-spacing,
  698. $ui-item-arrow-horizontal-spacing: $menu-item-arrow-horizontal-spacing,
  699. $ui-item-separator-margin: $menu-item-separator-margin,
  700. $ui-item-arrow-height: $menu-item-arrow-height,
  701. $ui-item-arrow-width: $menu-item-arrow-width,
  702. $ui-item-arrow-margin: $menu-item-arrow-margin,
  703. $ui-item-arrow-glyph-color: $menu-item-arrow-glyph-color,
  704. $ui-item-active-arrow-glyph-color: $menu-item-active-arrow-glyph-color,
  705. $ui-item-arrow-glyph: $menu-item-arrow-glyph,
  706. $ui-item-arrow-glyph-rtl: $menu-item-arrow-glyph-rtl,
  707. $ui-item-disabled-opacity: $menu-item-disabled-opacity,
  708. $ui-component-margin: $menu-component-margin,
  709. $ui-separator-border-color: $menu-separator-border-color,
  710. $ui-separator-background-color: $menu-separator-background-color,
  711. $ui-separator-size: $menu-separator-size,
  712. $ui-scroller-width: $menu-scroller-width,
  713. $ui-scroller-height: $menu-scroller-height,
  714. $ui-scroller-border-color: $menu-scroller-border-color,
  715. $ui-scroller-border-width: $menu-scroller-border-width,
  716. $ui-scroller-top-margin: $menu-scroller-top-margin,
  717. $ui-scroller-bottom-margin: $menu-scroller-bottom-margin,
  718. $ui-scroller-cursor: $menu-scroller-cursor,
  719. $ui-scroller-cursor-disabled: $menu-scroller-cursor-disabled,
  720. $ui-scroller-opacity: $menu-scroller-opacity,
  721. $ui-scroller-opacity-over: $menu-scroller-opacity-over,
  722. $ui-scroller-opacity-pressed: $menu-scroller-opacity-pressed,
  723. $ui-scroller-opacity-disabled: $menu-scroller-opacity-disabled,
  724. $ui-scroller-glyph-color: $menu-scroller-glyph-color,
  725. $ui-scroller-top-glyph: $menu-scroller-top-glyph,
  726. $ui-scroller-bottom-glyph: $menu-scroller-bottom-glyph,
  727. $ui-classic-scrollers: $menu-classic-scrollers,
  728. $ui-item-arrow-top-offset: 0
  729. ) {
  730. $ui-item-arrow-top: round(($ui-item-height - vertical($ui-item-border-width) - $ui-item-arrow-height) / 2) + $ui-item-arrow-top-offset !default;
  731. $ui-icon-separator-indent: before($ui-item-icon-horizontal-spacing) + $ui-item-icon-size + after($ui-item-icon-horizontal-spacing);
  732. $ui-item-indent: $ui-icon-separator-indent + $ui-separator-size + before($ui-item-text-horizontal-spacing);
  733. $ui-item-indent-no-separator: before($ui-item-icon-horizontal-spacing) + $ui-item-icon-size + max(after($ui-item-icon-horizontal-spacing), before($ui-item-text-horizontal-spacing));
  734. $ui-item-indent-right-icon: $ui-icon-separator-indent + before($ui-item-text-horizontal-spacing);
  735. $ui-item-indent-right-arrow: $ui-item-arrow-width + before($ui-item-arrow-horizontal-spacing) + after($ui-item-arrow-horizontal-spacing) + after($ui-item-text-horizontal-spacing);
  736. $ui-item-icon-top: round(($ui-item-height - vertical($ui-item-border-width) - $ui-item-icon-size) / 2) + $ui-item-icon-vertical-offset !default;
  737. @if not is-null($ui-border-width) and $ui-border-width != 0 {
  738. .#{$prefix}menu-#{$ui} {
  739. border-style: $ui-border-style;
  740. border-width: $ui-border-width;
  741. border-color: $ui-border-color;
  742. }
  743. }
  744. .#{$prefix}menu-body-#{$ui} {
  745. background: $ui-background-color;
  746. padding: $ui-padding;
  747. }
  748. .#{$prefix}menu-icon-separator-#{$ui} {
  749. left: $ui-icon-separator-indent;
  750. border-left: solid 1px $ui-separator-border-color;
  751. background-color: $ui-separator-background-color;
  752. width: $ui-separator-size;
  753. }
  754. @if $include-rtl {
  755. .#{$prefix}rtl > .#{$prefix}menu-icon-separator {
  756. left: auto;
  757. right: $ui-icon-separator-indent;
  758. }
  759. }
  760. .#{$prefix}menu-item-#{$ui} {
  761. border-width: $ui-item-border-width;
  762. cursor: $ui-item-cursor;
  763. // We duplicate the styling for both active and focused menu items
  764. // because an item may be active but not focused, and vice versa.
  765. &.#{$prefix}menu-item-focus,
  766. &.#{$prefix}menu-item-active {
  767. @include background-gradient($ui-item-active-background-color, $ui-item-background-gradient);
  768. @if $ui-item-active-border-radius != 0 {
  769. @include border-radius($ui-item-active-border-radius);
  770. }
  771. @if $ui-item-border-width != 0 {
  772. border-color: $ui-item-active-border-color;
  773. }
  774. // Background linear gradient
  775. @if $include-slicer-gradient {
  776. .#{$prefix}nlg & {
  777. background: $ui-item-active-background-color repeat-x left top;
  778. background-image: slicer-background-image(menu-item-#{$ui}-active, 'menu/menu-item-#{$ui}-active-bg');
  779. }
  780. }
  781. }
  782. &.#{$prefix}menu-item-disabled {
  783. cursor: $ui-item-disabled-cursor;
  784. a {
  785. cursor: $ui-item-disabled-cursor;
  786. }
  787. }
  788. &.#{$prefix}menu-item-separator {
  789. height: $ui-separator-size;
  790. border-top: solid 1px $ui-separator-border-color;
  791. background-color: $ui-separator-background-color;
  792. margin: $ui-item-separator-margin;
  793. padding: 0;
  794. }
  795. &.#{$prefix}menu-item-disabled {
  796. @include opacity($ui-item-disabled-opacity);
  797. @if $include-ie {
  798. .#{$prefix}ie9m & {
  799. .#{$prefix}menu-item-icon-#{ui} {
  800. @include opacity($ui-item-disabled-opacity);
  801. }
  802. .#{$prefix}menu-item-text-#{$ui} {
  803. // IE opacity/cleartype bug workaround
  804. background-color: transparent;
  805. }
  806. }
  807. }
  808. }
  809. @if $include-ext-form-labelable {
  810. // When Fields are added to Menus...
  811. .#{$prefix}form-item-label {
  812. font-size: $ui-item-font-size;
  813. color: $ui-text-color;
  814. }
  815. }
  816. }
  817. .#{$prefix}menu-item-text-#{$ui},
  818. .#{$prefix}menu-item-cmp-#{$ui} {
  819. margin: 0 after($ui-item-text-horizontal-spacing) 0 before($ui-item-text-horizontal-spacing);
  820. }
  821. .#{$prefix}menu-item-text-#{$ui} {
  822. font: $ui-item-font-weight $ui-item-font-size $ui-item-font-family;
  823. line-height: $ui-item-height - vertical($ui-item-border-width) - abs($ui-item-text-vertical-offset);
  824. @if $ui-item-text-vertical-offset > 0 {
  825. padding-top: $ui-item-text-vertical-offset;
  826. } @else if $ui-item-text-vertical-offset < 0 {
  827. padding-bottom: $ui-item-text-vertical-offset;
  828. }
  829. color: $ui-text-color;
  830. cursor: $ui-item-cursor; // needed to override cursor:default set by x-unselectable
  831. @if $ui-item-active-text-color != $ui-text-color {
  832. .#{$prefix}menu-item-focus &,
  833. .#{$prefix}menu-item-active & {
  834. color: $ui-item-active-text-color;
  835. }
  836. }
  837. &.#{$prefix}menu-item-indent {
  838. margin-left: $ui-item-indent;
  839. }
  840. &.#{$prefix}menu-item-indent-no-separator {
  841. margin-left: $ui-item-indent-no-separator;
  842. }
  843. &.#{$prefix}menu-item-indent-right-icon {
  844. margin-right: $ui-item-indent-right-icon;
  845. }
  846. &.#{$prefix}menu-item-indent-right-arrow {
  847. margin-right: $ui-item-indent-right-arrow;
  848. }
  849. .#{$prefix}menu-item-disabled & {
  850. cursor: $ui-item-disabled-cursor;
  851. }
  852. }
  853. @if $include-rtl {
  854. .#{$prefix}rtl {
  855. &.#{$prefix}menu-item-text-#{$ui},
  856. &.#{$prefix}menu-item-cmp-#{$ui} {
  857. margin: 0 before($ui-item-text-horizontal-spacing) 0 after($ui-item-text-horizontal-spacing);
  858. }
  859. &.#{$prefix}menu-item-text-#{$ui} {
  860. &.#{$prefix}menu-item-indent {
  861. margin-right: $ui-item-indent;
  862. }
  863. &.#{$prefix}menu-item-indent-no-separator {
  864. margin-right: $ui-item-indent-no-separator;
  865. }
  866. &.#{$prefix}menu-item-indent-right-icon {
  867. margin-left: $ui-item-indent-right-icon;
  868. }
  869. &.#{$prefix}menu-item-indent-right-arrow {
  870. margin-left: $ui-item-indent-right-arrow;
  871. }
  872. }
  873. }
  874. }
  875. .#{$prefix}menu-item-indent-#{$ui} {
  876. margin-left: $ui-item-indent;
  877. @if $include-rtl {
  878. &.#{$prefix}rtl {
  879. margin-left: 0;
  880. margin-right: $ui-item-indent;
  881. }
  882. }
  883. }
  884. .#{$prefix}menu-item-icon-#{$ui} {
  885. width: $ui-item-icon-size;
  886. height: $ui-item-icon-size;
  887. top: $ui-item-icon-top;
  888. left: before($ui-item-icon-horizontal-spacing);
  889. line-height: $ui-item-icon-size;
  890. font-size: $ui-glyph-font-size;
  891. color: $ui-glyph-color;
  892. @if $ui-item-active-glyph-color != $ui-glyph-color {
  893. .#{$prefix}menu-item-focus &,
  894. .#{$prefix}menu-item-active & {
  895. color: $ui-item-active-glyph-color;
  896. @if $include-ie {
  897. // In IE8 the text color is not applied due to some bug
  898. // so we have to force it
  899. .#{$prefix}ie8 & {
  900. color: $ui-item-active-glyph-color !important;
  901. }
  902. }
  903. }
  904. }
  905. background-position: $ui-item-icon-background-position;
  906. @if $include-rtl {
  907. &.#{$prefix}rtl {
  908. left: auto;
  909. right: before($ui-item-icon-horizontal-spacing);
  910. .#{$prefix}menu-item-focus &,
  911. .#{$prefix}menu-item-active & {
  912. right: before($ui-item-icon-horizontal-spacing) - left($ui-item-border-width);
  913. }
  914. }
  915. }
  916. &.#{$prefix}menu-item-glyph {
  917. @if $ui-glyph-opacity != 1 {
  918. // do not use the opacity mixin because we do not want IE's filter version of
  919. // opacity to be included. We emulate the opacity setting in IE8m by mixing
  920. // the icon color into the background color. (see below)
  921. opacity: $ui-glyph-opacity;
  922. }
  923. @if $include-ie {
  924. // In IE8 and below when a glyph contains partially transparent pixels, we
  925. // can't apply an opacity filter to the glyph element, because IE8m will render
  926. // the partially transparent pixels of the glyph as black. To work around this,
  927. // we emulate the approximate color that the glyph would have if it had opacity
  928. // applied by mixing the glyph color with the menus's background-color.
  929. .#{$prefix}ie8 & {
  930. color: mix($ui-glyph-color, $ui-background-color, $ui-glyph-opacity * 100);
  931. }
  932. }
  933. }
  934. // For when an icon needs to be used in the right position where a submenu arrow usually goes.
  935. // eg: When a CheckItem needs an icon. The left icon position is a checkbox, so the icon is moved to the right.
  936. &.#{$prefix}menu-item-icon-right {
  937. width: $ui-item-icon-size;
  938. height: $ui-item-icon-size;
  939. top: $ui-item-icon-top;
  940. right: after($ui-item-icon-horizontal-spacing);
  941. left: auto;
  942. background-position: $ui-item-icon-background-position;
  943. @if $include-rtl {
  944. &.#{$prefix}rtl {
  945. right: auto;
  946. left: after($ui-item-icon-horizontal-spacing);
  947. .#{$prefix}menu-item-focus &,
  948. .#{$prefix}menu-item-active & {
  949. left: after($ui-item-icon-horizontal-spacing) - right($ui-item-border-width);
  950. }
  951. }
  952. }
  953. }
  954. &.#{$prefix}menu-item-checkbox {
  955. @if $ui-item-checkbox-size != $ui-item-icon-size {
  956. height: $ui-item-checkbox-size;
  957. width: $ui-item-checkbox-size;
  958. }
  959. @if $enable-font-icons {
  960. color: $ui-item-checkbox-glyph-color;
  961. @if $ui-item-active-checkbox-glyph-color != $ui-item-checkbox-glyph-color {
  962. .#{$prefix}menu-item-focus &,
  963. .#{$prefix}menu-item-active & {
  964. color: $ui-item-active-checkbox-glyph-color;
  965. }
  966. }
  967. }
  968. .#{$prefix}menu-item-checked & {
  969. @if $enable-font-icons and ($ui-item-checkbox-checked-glyph != null) {
  970. @include font-icon($ui-item-checkbox-checked-glyph, $line-height: $ui-item-checkbox-size);
  971. } @else {
  972. background-image: theme-background-image('menu/#{$ui}-checked');
  973. }
  974. }
  975. .#{$prefix}menu-item-unchecked & {
  976. @if $enable-font-icons and ($ui-item-checkbox-glyph != null) {
  977. @include font-icon($ui-item-checkbox-glyph, $line-height: $ui-item-checkbox-size);
  978. } @else {
  979. background-image: theme-background-image('menu/#{$ui}-unchecked');
  980. }
  981. }
  982. }
  983. &.#{$prefix}menu-group-icon {
  984. @if $enable-font-icons {
  985. @if $ui-item-checkbox-group-glyph-color != $ui-item-checkbox-glyph-color {
  986. color: $ui-item-checkbox-group-glyph-color;
  987. }
  988. @if $ui-item-active-checkbox-group-glyph-color != $ui-item-checkbox-group-glyph-color {
  989. .#{$prefix}menu-item-focus &,
  990. .#{$prefix}menu-item-active & {
  991. color: $ui-item-active-checkbox-group-glyph-color;
  992. }
  993. }
  994. }
  995. .#{$prefix}menu-item-checked & {
  996. @if $enable-font-icons and ($ui-item-checkbox-group-checked-glyph != null) {
  997. @include font-icon($ui-item-checkbox-group-checked-glyph, $line-height: $ui-item-checkbox-size);
  998. } @else {
  999. background-image: theme-background-image('menu/#{$ui}-group-checked');
  1000. }
  1001. }
  1002. .#{$prefix}menu-item-unchecked & {
  1003. @if $enable-font-icons {
  1004. @if $ui-item-checkbox-group-glyph != null {
  1005. @include font-icon($ui-item-checkbox-group-glyph, $line-height: $ui-item-checkbox-size);
  1006. } @else {
  1007. &:before {
  1008. content: '';
  1009. }
  1010. }
  1011. }
  1012. background-image: none;
  1013. }
  1014. }
  1015. }
  1016. .#{$prefix}menu-item-arrow-#{$ui} {
  1017. width: $ui-item-arrow-width;
  1018. height: $ui-item-arrow-height;
  1019. top: $ui-item-arrow-top - top($ui-item-border-width);
  1020. right: after($ui-item-arrow-horizontal-spacing) - right($ui-item-border-width);
  1021. margin: $ui-item-arrow-margin;
  1022. @if $enable-font-icons and ($ui-item-arrow-glyph != null) {
  1023. @include font-icon($ui-item-arrow-glyph);
  1024. color: $ui-item-arrow-glyph-color;
  1025. @if $ui-item-active-arrow-glyph-color != $ui-item-arrow-glyph-color {
  1026. .#{$prefix}menu-item-focus &,
  1027. .#{$prefix}menu-item-active & {
  1028. color: $ui-item-active-arrow-glyph-color;
  1029. }
  1030. }
  1031. } @else {
  1032. background-image: theme-background-image('menu/#{$ui}-menu-parent');
  1033. }
  1034. .#{$prefix}menu-item-focus &,
  1035. .#{$prefix}menu-item-active & {
  1036. top: $ui-item-arrow-top - top($ui-item-border-width);
  1037. right: after($ui-item-arrow-horizontal-spacing) - right($ui-item-border-width);
  1038. }
  1039. @if $include-rtl {
  1040. &.#{$prefix}rtl {
  1041. left: after($ui-item-arrow-horizontal-spacing);
  1042. right: auto;
  1043. @if $enable-font-icons and ($ui-item-arrow-glyph-rtl != null) {
  1044. @include font-icon($ui-item-arrow-glyph-rtl);
  1045. }
  1046. @else {
  1047. background-image: theme-background-image('menu/#{$ui}-menu-parent-left');
  1048. }
  1049. .#{$prefix}menu-item-focus &,
  1050. .#{$prefix}menu-item-active & {
  1051. left: after($ui-item-arrow-horizontal-spacing) - right($ui-item-border-width);
  1052. }
  1053. }
  1054. }
  1055. }
  1056. @if $include-ext-layout-container-boxoverflow-scroller {
  1057. @include extjs-box-scroller-ui(
  1058. $ui: $ui,
  1059. $type: 'menu',
  1060. $vertical-width: $ui-scroller-width,
  1061. $vertical-height: $ui-scroller-height,
  1062. $top-margin: $ui-scroller-top-margin,
  1063. $bottom-margin: $ui-scroller-bottom-margin,
  1064. $vertical-border-color: $ui-scroller-border-color,
  1065. $vertical-border-width: $ui-scroller-border-width,
  1066. $glyph-color: $ui-scroller-glyph-color,
  1067. $top-glyph: $ui-scroller-top-glyph,
  1068. $bottom-glyph: $ui-scroller-bottom-glyph,
  1069. $container-padding: $ui-padding,
  1070. $cursor: $ui-scroller-cursor,
  1071. $cursor-disabled: $ui-scroller-cursor-disabled,
  1072. $align: middle,
  1073. $opacity: $ui-scroller-opacity,
  1074. $opacity-over: $ui-scroller-opacity-over,
  1075. $opacity-pressed: $ui-scroller-opacity-pressed,
  1076. $opacity-disabled: $ui-scroller-opacity-disabled,
  1077. $classic: $ui-classic-scrollers,
  1078. $include-horizontal: false
  1079. );
  1080. }
  1081. // EXTJSIV-8846: partially transparent png images do not display correctly
  1082. // in winXP/IE8 when the image element has a transparent background.
  1083. // to fix this, we give the element the same background-color as the menu.
  1084. .#{$prefix}ie8 {
  1085. .#{$prefix}box-scroller-menu-#{$ui} {
  1086. background-color: $ui-background-color;
  1087. }
  1088. }
  1089. @if not is-null($ui-item-background-gradient) {
  1090. $stretch: slicer-background-stretch(menu-item-#{$ui}-active, bottom);
  1091. @include x-slicer(menu-item-#{$ui}-active);
  1092. }
  1093. }