Window.scss 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015
  1. /**
  2. * @class Ext.window.Window
  3. */
  4. /**
  5. * @var {color}
  6. * The base color of Windows
  7. */
  8. $window-base-color: dynamic($base-color);
  9. /**
  10. * @var {number}
  11. * The padding of Windows.
  12. *
  13. * The padding value must be equal to or greater than value specified in the
  14. * {@link #$window-border-radius} variable (or the maximum value if corner values
  15. * are specified individually).
  16. * See also: {@link #$window-ignore-frame-padding}
  17. */
  18. $window-padding: dynamic($panel-frame-padding);
  19. /**
  20. * @var {number}
  21. * The border-radius of Windows
  22. */
  23. $window-border-radius: dynamic($panel-frame-border-radius);
  24. /**
  25. * @var {number}
  26. * The border-width of Windows
  27. */
  28. $window-border-width: dynamic(1px);
  29. /**
  30. * @var {color}
  31. * The border-color of Windows
  32. */
  33. $window-border-color: dynamic($window-base-color);
  34. /**
  35. * @var {color}
  36. * The inner border-color of Windows
  37. */
  38. $window-inner-border-color: dynamic(#fff);
  39. /**
  40. * @var {number}
  41. * The inner border-width of Windows
  42. */
  43. $window-inner-border-width: dynamic(0);
  44. /**
  45. * @var {color}
  46. * The background-color of Windows
  47. */
  48. $window-background-color: dynamic(#fff);
  49. /**
  50. * @var {number}
  51. * The body border-width of Windows
  52. */
  53. $window-body-border-width: dynamic(1px);
  54. /**
  55. * @var {string}
  56. * The body border-style of Windows
  57. */
  58. $window-body-border-style: dynamic(solid);
  59. /**
  60. * @var {color}
  61. * The body border-color of Windows
  62. */
  63. $window-body-border-color: dynamic($window-base-color);
  64. /**
  65. * @var {color}
  66. * The body background-color of Windows
  67. */
  68. $window-body-background-color: dynamic(#fff);
  69. /**
  70. * @var {color}
  71. * The body text color of Windows
  72. */
  73. $window-body-color: dynamic(#000);
  74. /**
  75. * @var {number/list}
  76. * The padding of Window Headers
  77. */
  78. $window-header-padding: dynamic($panel-frame-header-padding);
  79. /**
  80. * @var {number}
  81. * The font-size of Window Headers
  82. */
  83. $window-header-font-size: dynamic($panel-header-font-size);
  84. /**
  85. * @var {number}
  86. * The line-height of Window Headers
  87. */
  88. $window-header-line-height: dynamic($panel-header-line-height);
  89. /**
  90. * @var {color}
  91. * The text color of Window Headers
  92. */
  93. $window-header-color: dynamic($panel-header-color);
  94. /**
  95. * @var {color}
  96. * The background-color of Window Headers
  97. */
  98. $window-header-background-color: dynamic($window-base-color);
  99. /**
  100. * @var {string}
  101. * The font-weight of Window Headers
  102. */
  103. $window-header-font-weight: dynamic($panel-header-font-weight);
  104. /**
  105. * @var {number}
  106. * The space between the Window {@link Ext.panel.Tool Tools}
  107. */
  108. $window-tool-spacing: dynamic($panel-tool-spacing);
  109. /**
  110. * @var {string}
  111. * The background sprite to use for Window {@link Ext.panel.Tool Tools}
  112. */
  113. $window-tool-background-image: dynamic('tools/tool-sprites');
  114. /**
  115. * @var {color}
  116. * The color of the outline around Window {@link Ext.panel.Tool Tools} when focused
  117. */
  118. $window-tool-focus-outline-color: dynamic($panel-tool-focus-outline-color);
  119. /**
  120. * @var {string}
  121. * The outline-style of Window {@link Ext.panel.Tool Tools} when focused
  122. */
  123. $window-tool-focus-outline-style: dynamic($panel-tool-focus-outline-style);
  124. /**
  125. * @var {number}
  126. * The outline-width of Window {@link Ext.panel.Tool Tools} when focused
  127. */
  128. $window-tool-focus-outline-width: dynamic($panel-tool-focus-outline-width);
  129. /**
  130. * @var {number}
  131. * The outline-offset of Window {@link Ext.panel.Tool Tools} when focused
  132. */
  133. $window-tool-focus-outline-offset: dynamic($panel-tool-focus-outline-offset);
  134. /**
  135. * @var {string}
  136. * The font-family of Window Headers
  137. */
  138. $window-header-font-family: dynamic($panel-header-font-family);
  139. /**
  140. * @var {number/list}
  141. * The padding of the Window Header's text element
  142. */
  143. $window-header-text-padding: dynamic($panel-header-text-padding);
  144. /**
  145. * @var {string}
  146. * The text-transform of Window Headers
  147. */
  148. $window-header-text-transform: dynamic($panel-header-text-transform);
  149. /**
  150. * @var {number}
  151. * The width of the Window Header icon
  152. */
  153. $window-header-icon-width: dynamic($panel-header-icon-width);
  154. /**
  155. * @var {number}
  156. * The height of the Window Header icon
  157. */
  158. $window-header-icon-height: dynamic($panel-header-icon-height);
  159. /**
  160. * @var {number}
  161. * The space between the Window Header icon and text
  162. */
  163. $window-header-icon-spacing: dynamic($panel-header-icon-spacing);
  164. /**
  165. * @var {list}
  166. * The background-position of the Window Header icon
  167. */
  168. $window-header-icon-background-position: dynamic($panel-header-icon-background-position);
  169. /**
  170. * @var {color}
  171. * The color of the Window Header glyph icon
  172. */
  173. $window-header-glyph-color: dynamic($window-header-color);
  174. /**
  175. * @var {number}
  176. * The opacity of the Window Header glyph icon
  177. */
  178. $window-header-glyph-opacity: dynamic($panel-header-glyph-opacity);
  179. /**
  180. * @var {number}
  181. * The border-width of Window Headers
  182. */
  183. $window-header-border-width: dynamic(1px);
  184. /**
  185. * @var {color}
  186. * The inner border-color of Window Headers
  187. */
  188. $window-header-inner-border-color: dynamic(#fff);
  189. /**
  190. * @var {number}
  191. * The inner border-width of Window Headers
  192. */
  193. $window-header-inner-border-width: dynamic(0);
  194. /**
  195. * @var {boolean} $window-force-header-border
  196. * True to force the window header to have a border on the side facing the window body.
  197. * Overrides dock layout's border management border removal rules.
  198. */
  199. $window-force-header-border: dynamic(true);
  200. /**
  201. * @var {number}
  202. * The opacity of ghost Windows while dragging
  203. */
  204. $window-ghost-opacity: dynamic($panel-ghost-opacity);
  205. /**
  206. * @var {boolean}
  207. * True to include neptune style border management rules.
  208. */
  209. $window-include-border-management-rules: dynamic(false);
  210. /**
  211. * @var {color}
  212. * The color to apply to the border that wraps the body and docked items. The presence of
  213. * the wrap border is controlled by the {@link #border} config. Only applicable when
  214. * `$window-include-border-management-rules` is `true`.
  215. */
  216. $window-wrap-border-color: dynamic($window-border-color);
  217. /**
  218. * @var {number}
  219. * The width to apply to the border that wraps the body and docked items. The presence of
  220. * the wrap border is controlled by the {@link #border} config. Only applicable when
  221. * `$window-include-border-management-rules` is `true`.
  222. */
  223. $window-wrap-border-width: dynamic(1px);
  224. /**
  225. * @var {boolean}
  226. * True to include the "default" window UI
  227. */
  228. $include-window-default-ui: dynamic($include-default-uis);
  229. /**
  230. * @var {boolean}
  231. * True to ignore the frame padding. By default, the frame mixin adds extra padding when
  232. * border radius is larger than border width. This is intended to prevent the content
  233. * from colliding with the rounded corners of the frame. Set this to true to prevent
  234. * the panel frame from adding this extra padding.
  235. *
  236. * **Note:** This var is not applicable to IE8 & IE9.
  237. */
  238. $window-ignore-frame-padding: dynamic($panel-ignore-frame-padding);
  239. /**
  240. * @var {number}
  241. * The default font-size of the Window body
  242. */
  243. $window-body-font-size: dynamic($panel-body-font-size);
  244. /**
  245. * @var {string}
  246. * The default font-weight of the Window body
  247. */
  248. $window-body-font-weight: dynamic($panel-body-font-weight);
  249. /**
  250. * @var {string}
  251. * The default font-family of the Window body
  252. */
  253. $window-body-font-family: dynamic($panel-body-font-family);
  254. // private
  255. $window-use-classic-header-padding: dynamic(false);
  256. /**
  257. * Creates a visual theme for a Window
  258. *
  259. * @param {string} $ui
  260. * The name of the UI being created. Can not included spaces or special punctuation
  261. * (used in CSS class names).
  262. *
  263. * @param {number} [$ui-padding=$window-padding]
  264. * The padding of the Window
  265. *
  266. * @param {number} [$ui-border-radius=$window-border-radius]
  267. * The border-radius of the Window
  268. *
  269. * @param {color} [$ui-border-color=$window-border-color]
  270. * The border-color of the Window
  271. *
  272. * @param {number} [$ui-border-width=$window-border-width]
  273. * The border-width of the Window
  274. *
  275. * @param {color} [$ui-inner-border-color=$window-inner-border-color]
  276. * The inner border-color of the Window
  277. *
  278. * @param {number} [$ui-inner-border-width=$window-inner-border-width]
  279. * The inner border-width of the Window
  280. *
  281. * @param {color} [$ui-header-color=$window-header-color]
  282. * The text color of the Header
  283. *
  284. * @param {color} [$ui-header-background-color=$window-header-background-color]
  285. * The background-color of the Header
  286. *
  287. * @param {number/list} [$ui-header-padding=$window-header-padding]
  288. * The padding of the Header
  289. *
  290. * @param {string} [$ui-header-font-family=$window-header-font-family]
  291. * The font-family of the Header
  292. *
  293. * @param {number} [$ui-header-font-size=$window-header-font-size]
  294. * The font-size of the Header
  295. *
  296. * @param {string} [$ui-header-font-weight=$window-header-font-weight]
  297. * The font-weight of the Header
  298. *
  299. * @param {number} [$ui-header-line-height=$window-header-line-height]
  300. * The line-height of the Header
  301. *
  302. * @param {number/list} [$ui-header-text-padding=$window-header-text-padding]
  303. * The padding of the Header's text element
  304. *
  305. * @param {string} [$ui-header-text-transform=$window-header-text-transform]
  306. * The text-transform of the Header
  307. *
  308. * @param {color} [$ui-header-border-color=$ui-border-color]
  309. * The border-color of the Header
  310. *
  311. * @param {number} [$ui-header-border-width=$window-header-border-width]
  312. * The border-width of the Header
  313. *
  314. * @param {color} [$ui-header-inner-border-color=$window-header-inner-border-color]
  315. * The inner border-color of the Header
  316. *
  317. * @param {number} [$ui-header-inner-border-width=$window-header-inner-border-width]
  318. * The inner border-width of the Header
  319. *
  320. * @param {number} [$ui-header-icon-width=$window-header-icon-width]
  321. * The width of the Header icon
  322. *
  323. * @param {number} [$ui-header-icon-height=$window-header-icon-height]
  324. * The height of the Header icon
  325. *
  326. * @param {number} [$ui-header-icon-spacing=$window-header-icon-spacing]
  327. * The space between the Header icon and text
  328. *
  329. * @param {list} [$ui-header-icon-background-position=$window-header-icon-background-position]
  330. * The background-position of the Header icon
  331. *
  332. * @param {color} [$ui-header-glyph-color=$window-header-glyph-color]
  333. * The color of the Header glyph icon
  334. *
  335. * @param {number} [$ui-header-glyph-opacity=$window-header-glyph-opacity]
  336. * The opacity of the Header glyph icon
  337. *
  338. * @param {number} [$ui-tool-spacing=$window-tool-spacing]
  339. * The space between the {@link Ext.panel.Tool Tools}
  340. *
  341. * @param {string} [$ui-tool-background-image=$window-tool-background-image]
  342. * The background sprite to use for {@link Ext.panel.Tool Tools}
  343. *
  344. * @param {color} [$ui-tool-focus-outline-color=$window-tool-focus-outline-color]
  345. * The color of the outline around {@link Ext.panel.Tool Tools} when focused
  346. *
  347. * @param {string} [$ui-tool-focus-outline-style=$window-tool-focus-outline-style]
  348. * The outline-style of {@link Ext.panel.Tool Tools} when focused
  349. *
  350. * @param {number} [$ui-tool-focus-outline-width=$window-tool-focus-outline-width]
  351. * The outline-width of {@link Ext.panel.Tool Tools} when focused
  352. *
  353. * @param {number} [$ui-tool-focus-outline-offset=$window-tool-focus-outline-offset]
  354. * The outline-offset of {@link Ext.panel.Tool Tools} when focused
  355. *
  356. * @param {color} [$ui-body-border-color=$window-body-border-color]
  357. * The border-color of the Window body
  358. *
  359. * @param {color} [$ui-body-background-color=$window-body-background-color]
  360. * The background-color of the Window body
  361. *
  362. * @param {number} [$ui-body-border-width=$window-body-border-width]
  363. * The border-width of the Window body
  364. *
  365. * @param {string} [$ui-body-border-style=$window-body-border-style]
  366. * The border-style of the Window body
  367. *
  368. * @param {color} [$ui-body-color=$window-body-color]
  369. * The color of text inside the Window body
  370. *
  371. * @param {Number} [$ui-body-font-size=$window-body-font-size]
  372. * The body font size
  373. *
  374. * @param {Number} [$ui-body-font-weight=$window-body-font-weight]
  375. * The body font weight
  376. *
  377. * @param {String} [$ui-body-font-family=$window-body-font-family]
  378. * The body font family
  379. *
  380. * @param {color} [$ui-background-color=$window-background-color]
  381. * The background color
  382. *
  383. * @param {boolean} [$ui-force-header-border=$window-force-header-border]
  384. * True to force the window header to have a border on the side facing
  385. * the window body. Overrides dock layout's border management border
  386. * removal rules.
  387. *
  388. * @param {boolean} [$ui-include-border-management-rules=$window-include-border-management-rules]
  389. * True to include neptune style border management rules.
  390. *
  391. * @param {color} [$ui-wrap-border-color=$window-wrap-border-color]
  392. * The color to apply to the border that wraps the body and docked items. The presence of
  393. * the wrap border is controlled by the {@link #border} config. Only applicable when
  394. * `$ui-include-border-management-rules` is `true`.
  395. *
  396. * @param {color} [$ui-wrap-border-width=$window-wrap-border-width]
  397. * The width to apply to the border that wraps the body and docked items. The presence of
  398. * the wrap border is controlled by the {@link #border} config. Only applicable when
  399. * `$ui-include-border-management-rules` is `true`.
  400. *
  401. * @param {boolean} [$ui-ignore-frame-padding=$window-ignore-frame-padding]
  402. * True to ignore the frame padding. By default, the frame mixin adds extra padding when
  403. * border radius is larger than border width. This is intended to prevent the content
  404. * from colliding with the rounded corners of the frame. Set this to true to prevent
  405. * the window frame from adding this extra padding.
  406. *
  407. * @param {string} $ui-label
  408. * This is deprecated, please use $ui instead.
  409. *
  410. * @member Ext.window.Window
  411. */
  412. @mixin extjs-window-ui(
  413. $ui: null,
  414. $ui-padding: $window-padding,
  415. $ui-border-radius: $window-border-radius,
  416. $ui-border-color: $window-border-color,
  417. $ui-border-width: $window-border-width,
  418. $ui-inner-border-color: $window-inner-border-color,
  419. $ui-inner-border-width: $window-inner-border-width,
  420. $ui-header-color: $window-header-color,
  421. $ui-header-background-color: $window-header-background-color,
  422. $ui-header-padding: $window-header-padding,
  423. $ui-header-font-family: $window-header-font-family,
  424. $ui-header-font-size: $window-header-font-size,
  425. $ui-header-font-weight: $window-header-font-weight,
  426. $ui-header-line-height: $window-header-line-height,
  427. $ui-header-text-padding: $window-header-text-padding,
  428. $ui-header-text-transform: $window-header-text-transform,
  429. $ui-header-border-color: $ui-border-color,
  430. $ui-header-border-width: $window-header-border-width,
  431. $ui-header-inner-border-color: $window-header-inner-border-color,
  432. $ui-header-inner-border-width: $window-header-inner-border-width,
  433. $ui-header-icon-width: $window-header-icon-width,
  434. $ui-header-icon-height: $window-header-icon-height,
  435. $ui-header-icon-spacing: $window-header-icon-spacing,
  436. $ui-header-icon-background-position: $window-header-icon-background-position,
  437. $ui-header-glyph-color: $window-header-glyph-color,
  438. $ui-header-glyph-opacity: $window-header-glyph-opacity,
  439. $ui-tool-spacing: $window-tool-spacing,
  440. $ui-tool-background-image: $window-tool-background-image,
  441. $ui-tool-focus-outline-color: $window-tool-focus-outline-color,
  442. $ui-tool-focus-outline-style: $window-tool-focus-outline-style,
  443. $ui-tool-focus-outline-width: $window-tool-focus-outline-width,
  444. $ui-tool-focus-outline-offset: $window-tool-focus-outline-offset,
  445. $ui-body-border-color: $window-body-border-color,
  446. $ui-body-background-color: $window-body-background-color,
  447. $ui-body-border-width: $window-body-border-width,
  448. $ui-body-border-style: $window-body-border-style,
  449. $ui-body-color: $window-body-color,
  450. $ui-body-font-size: $window-body-font-size,
  451. $ui-body-font-weight: $window-body-font-weight,
  452. $ui-body-font-family: $window-body-font-family,
  453. $ui-background-color: $window-background-color,
  454. // See the docs above
  455. $ui-force-header-border: $window-force-header-border,
  456. $ui-include-border-management-rules: $window-include-border-management-rules,
  457. $ui-wrap-border-color: null,
  458. $ui-wrap-border-width: null,
  459. $ui-ignore-frame-padding: $window-ignore-frame-padding,
  460. // deprecated - use $ui instead
  461. $ui-label: null
  462. ){
  463. @if $ui == null {
  464. @if $ui-label != null {
  465. @warn '$ui-label is deprecated. Use $ui instead';
  466. $ui: $ui-label;
  467. } @else {
  468. @warn "#{error('$ui is required')}";
  469. }
  470. }
  471. @if is-null($ui-wrap-border-color) {
  472. @if $ui == 'default' {
  473. $ui-wrap-border-color: $window-wrap-border-color;
  474. } @else {
  475. $ui-wrap-border-color: $ui-border-color;
  476. }
  477. }
  478. @if is-null($ui-wrap-border-width) {
  479. @if $ui == 'default' {
  480. $ui-wrap-border-width: $window-wrap-border-width;
  481. } @else {
  482. $ui-wrap-border-width: $ui-border-width;
  483. }
  484. }
  485. .#{$prefix}window-#{$ui} {
  486. @if not is-null($ui-border-color) { border-color: $ui-border-color; }
  487. @if not is-null($ui-border-radius) { @include border-radius($ui-border-radius); }
  488. @if $ui-inner-border-width != 0 {
  489. @include inner-border($ui-inner-border-width, $ui-inner-border-color);
  490. }
  491. }
  492. @if not is-null($ui-border-radius) and $ui-border-radius != 0{
  493. @include x-frame(
  494. 'window',
  495. $ui,
  496. $border-radius: $ui-border-radius,
  497. $border-width: $ui-border-width,
  498. $padding: $ui-padding,
  499. $background-color: $ui-background-color,
  500. $ignore-frame-padding: $ui-ignore-frame-padding
  501. );
  502. }
  503. .#{$prefix}window-body-#{$ui} {
  504. @if not is-null($ui-body-border-color) {
  505. border-color: $ui-body-border-color;
  506. border-width: $ui-body-border-width;
  507. border-style: $ui-body-border-style;
  508. }
  509. @if not is-null($ui-body-background-color) { background: $ui-body-background-color; }
  510. @if not is-null($ui-body-color) { color: $ui-body-color; }
  511. @if not is-null($ui-body-font-size) { font-size: $ui-body-font-size; }
  512. @if not is-null($ui-body-font-weight) { font-weight: $ui-body-font-weight; }
  513. @if not is-null($ui-body-font-family) { font-family: $ui-body-font-family; }
  514. }
  515. .#{$prefix}window-header-#{$ui} {
  516. @if not is-null($ui-header-font-size) { font-size: $ui-header-font-size; }
  517. @if not is-null($ui-border-color) { border-color: $ui-border-color; }
  518. background-color: $ui-header-background-color;
  519. .#{$prefix}tool-img {
  520. @if $ui-tool-background-image != $tool-background-image {
  521. background-image: theme-background-image($ui-tool-background-image);
  522. }
  523. // EXTJSIV-8846: partially transparent png images do not display correctly
  524. // in winXP/IE8m when the image element has a transparent background.
  525. // to fix this, we give the element the same background-color as the header.
  526. background-color: $ui-header-background-color;
  527. }
  528. }
  529. @if $include-ext-tab-bar {
  530. .#{$prefix}window-header-#{$ui}-horizontal {
  531. .#{$prefix}window-header-#{$ui}-tab-bar {
  532. margin-top: -(top($ui-header-padding));
  533. margin-bottom: -(bottom($ui-header-padding));
  534. }
  535. }
  536. .#{$prefix}window-header-#{$ui}-vertical {
  537. .#{$prefix}window-header-#{$ui}-tab-bar {
  538. margin-right: -(top($ui-header-padding));
  539. margin-left: -(bottom($ui-header-padding));
  540. }
  541. }
  542. @if $include-rtl {
  543. .#{$prefix}rtl.#{$prefix}window-header-#{$ui}-vertical {
  544. .#{$prefix}window-header-#{$ui}-tab-bar {
  545. margin-left: -(top($ui-header-padding));
  546. margin-right: -(bottom($ui-header-padding));
  547. }
  548. }
  549. }
  550. }
  551. .#{$prefix}window-header-title-#{$ui} {
  552. @if not is-null($ui-header-color) { color: $ui-header-color; }
  553. @if not is-null($ui-header-font-size) { font-size: $ui-header-font-size; }
  554. @if not is-null($ui-header-font-weight) { font-weight: $ui-header-font-weight; }
  555. @if not is-null($ui-header-font-family) { font-family: $ui-header-font-family; }
  556. @if not is-null($ui-header-line-height) { line-height: $ui-header-line-height; }
  557. > {
  558. .#{$prefix}title-text-#{$ui} {
  559. padding: $ui-header-text-padding;
  560. text-transform: $ui-header-text-transform;
  561. @if $ext-trial {
  562. &:after {
  563. font-family: ext-watermark;
  564. font-size: ($ui-header-line-height + vertical($ui-header-padding)) * 0.75;
  565. content: 'd';
  566. position: absolute;
  567. top: 0;
  568. right: 0;
  569. // since IE8 does not support opacity on pseudo elements we simulate it by
  570. // mixing the text color with the background color
  571. color: mix($ui-header-color, $ui-header-background-color, 40%);
  572. }
  573. @if $include-rtl {
  574. &.#{$prefix}rtl:after {
  575. right: auto;
  576. left: 0;
  577. }
  578. }
  579. }
  580. @if $ext-beta {
  581. &:after {
  582. font-family: ext-watermark;
  583. font-size: ($ui-header-line-height + vertical($ui-header-padding)) * 0.75;
  584. content: 'b';
  585. position: absolute;
  586. top: 0;
  587. right: 0;
  588. // since IE8 does not support opacity on pseudo elements we simulate it by
  589. // mixing the text color with the background color
  590. color: mix($ui-header-color, $ui-header-background-color, 40%);
  591. }
  592. @if $include-rtl {
  593. &.#{$prefix}rtl:after {
  594. right: auto;
  595. left: 0;
  596. }
  597. }
  598. }
  599. }
  600. .#{$prefix}title-icon-wrap-#{$ui} {
  601. &.#{$prefix}title-icon-top {
  602. height: $ui-header-icon-height + $ui-header-icon-spacing;
  603. padding-bottom: $ui-header-icon-spacing;
  604. }
  605. &.#{$prefix}title-icon-right {
  606. width: $ui-header-icon-width + $ui-header-icon-spacing;
  607. padding-left: $ui-header-icon-spacing;
  608. @if $include-rtl {
  609. &.#{$prefix}rtl {
  610. padding-left: 0;
  611. padding-right: $ui-header-icon-spacing;
  612. }
  613. }
  614. }
  615. &.#{$prefix}title-icon-bottom {
  616. height: $ui-header-icon-height + $ui-header-icon-spacing;
  617. padding-top: $ui-header-icon-spacing;
  618. }
  619. &.#{$prefix}title-icon-left {
  620. width: $ui-header-icon-width + $ui-header-icon-spacing;
  621. padding-right: $ui-header-icon-spacing;
  622. @if $include-rtl {
  623. &.#{$prefix}rtl {
  624. padding-right: 0;
  625. padding-left: $ui-header-icon-spacing;
  626. }
  627. }
  628. }
  629. > .#{$prefix}title-icon-#{$ui} {
  630. width: $ui-header-icon-width;
  631. height: $ui-header-icon-height;
  632. font-size: $ui-header-icon-height;
  633. color: $ui-header-glyph-color;
  634. background-position: $ui-header-icon-background-position;
  635. &.#{$prefix}title-glyph {
  636. @if $ui-header-glyph-opacity != 1 {
  637. // do not use the opacity mixin because we do not want IE's filter version of
  638. // opacity to be included. We emulate the opacity setting in IE8m by mixing
  639. // the icon color into the background color. (see below)
  640. opacity: $ui-header-glyph-opacity;
  641. }
  642. // In IE8 and below when a glyph contains partially transparent pixels, we
  643. // can't apply an opacity filter to the glyph element, because IE8m will render
  644. // the partially transparent pixels of the glyph as black. To work around this,
  645. // we emulate the approximate color that the glyph would have if it had opacity
  646. // applied by mixing the glyph color with the header's background-color.
  647. @if $include-ie {
  648. .#{$prefix}ie8 & {
  649. color: mix($ui-header-glyph-color, $ui-header-background-color, $ui-header-glyph-opacity * 100);
  650. }
  651. }
  652. }
  653. }
  654. }
  655. }
  656. }
  657. $header-border-bottom-width: 0;
  658. @if $ui-force-header-border {
  659. $header-border-bottom-width: bottom($ui-header-border-width);
  660. }
  661. $header-expanded-padding: $ui-header-padding;
  662. @if $window-use-classic-header-padding {
  663. $frame-top: max(top($ui-border-width), max(top($ui-border-radius), right($ui-border-radius)));
  664. $header-bottom-padding-adjust: $frame-top - top($ui-border-width);
  665. $header-expanded-padding:
  666. top($ui-header-padding),
  667. right($ui-header-padding),
  668. bottom($ui-header-padding) - $header-bottom-padding-adjust,
  669. left($ui-header-padding);
  670. }
  671. @if not is-null($ui-border-radius) and $ui-border-radius != 0 {
  672. @include x-frame(
  673. $cls: 'window-header',
  674. $ui: '#{$ui}-top',
  675. $border-radius: top($ui-border-radius) right($ui-border-radius) 0 0,
  676. $border-width: top($ui-header-border-width) right($ui-header-border-width) $header-border-bottom-width left($ui-header-border-width),
  677. $padding: $header-expanded-padding,
  678. $background-color: $ui-header-background-color
  679. );
  680. @include x-frame(
  681. $cls: 'window-header',
  682. $ui: '#{$ui}-right',
  683. $border-radius: 0 top($ui-border-radius) right($ui-border-radius) 0,
  684. $border-width: left($ui-header-border-width) top($ui-header-border-width) right($ui-header-border-width) $header-border-bottom-width,
  685. $padding: rotate90($header-expanded-padding),
  686. $background-color: $ui-header-background-color,
  687. $include-frame-rtl: $include-rtl
  688. );
  689. @include x-frame(
  690. $cls: 'window-header',
  691. $ui: '#{$ui}-bottom',
  692. $border-radius: 0 0 top($ui-border-radius) left($ui-border-radius),
  693. $border-width: $header-border-bottom-width right($ui-header-border-width) top($ui-header-border-width) left($ui-header-border-width),
  694. $padding: rotate180($header-expanded-padding),
  695. $background-color: $ui-header-background-color
  696. );
  697. @include x-frame(
  698. $cls: 'window-header',
  699. $ui: '#{$ui}-left',
  700. $border-radius: right($ui-border-radius) 0 0 top($ui-border-radius),
  701. $border-width: right($ui-header-border-width) $header-border-bottom-width left($ui-header-border-width) top($ui-header-border-width),
  702. $padding: rotate270($header-expanded-padding),
  703. $background-color: $ui-header-background-color,
  704. $include-frame-rtl: $include-rtl
  705. );
  706. @include x-frame(
  707. $cls: 'window-header',
  708. $ui: '#{$ui}-collapsed-top',
  709. $border-radius: $ui-border-radius,
  710. $border-width: $ui-header-border-width,
  711. $padding: $ui-header-padding,
  712. $background-color: $ui-header-background-color
  713. );
  714. @include x-frame(
  715. $cls: 'window-header',
  716. $ui: '#{$ui}-collapsed-right',
  717. $border-radius: $ui-border-radius,
  718. $border-width: $ui-header-border-width,
  719. $padding: rotate90($ui-header-padding),
  720. $background-color: $ui-header-background-color,
  721. $include-frame-rtl: $include-rtl
  722. );
  723. @include x-frame(
  724. $cls: 'window-header',
  725. $ui: '#{$ui}-collapsed-bottom',
  726. $border-radius: $ui-border-radius,
  727. $border-width: $ui-header-border-width,
  728. $padding: rotate180($ui-header-padding),
  729. $background-color: $ui-header-background-color
  730. );
  731. @include x-frame(
  732. $cls: 'window-header',
  733. $ui: '#{$ui}-collapsed-left',
  734. $border-radius: $ui-border-radius,
  735. $border-width: $ui-header-border-width,
  736. $padding: rotate270($ui-header-padding),
  737. $background-color: $ui-header-background-color,
  738. $include-frame-rtl: $include-rtl
  739. );
  740. }
  741. @if $ui-header-inner-border-width != 0 {
  742. .#{$prefix}window-header-#{$ui}-top {
  743. @include inner-border($ui-header-inner-border-width, $ui-header-inner-border-color);
  744. }
  745. .#{$prefix}window-header-#{$ui}-right {
  746. @include inner-border(rotate90($ui-header-inner-border-width), $ui-inner-border-color);
  747. }
  748. .#{$prefix}window-header-#{$ui}-bottom {
  749. @include inner-border(rotate180($ui-header-inner-border-width), $ui-inner-border-color);
  750. }
  751. .#{$prefix}window-header-#{$ui}-left {
  752. @include inner-border(rotate270($ui-header-inner-border-width), $ui-inner-border-color);
  753. }
  754. }
  755. .#{$prefix}window-header-#{$ui} {
  756. .#{$prefix}window-header-icon {
  757. width: $ui-header-icon-width;
  758. height: $ui-header-icon-height;
  759. // color, font-size, and line-height are needed for glyph icons
  760. color: $ui-header-glyph-color;
  761. font-size: $ui-header-icon-height;
  762. line-height: $ui-header-icon-height;
  763. background-position: $window-header-icon-background-position;
  764. }
  765. .#{$prefix}window-header-glyph {
  766. color: $ui-header-glyph-color;
  767. font-size: $ui-header-icon-height;
  768. line-height: $ui-header-icon-height;
  769. @if $ui-header-glyph-opacity != 1 {
  770. // do not use the opacity mixin because we do not want IE's filter version of
  771. // opacity to be included. We emulate the opacity setting in IE8m by mixing
  772. // the icon color into the background color. (see below)
  773. opacity: $ui-header-glyph-opacity;
  774. }
  775. // In IE8 and below when a glyph contains partially transparent pixels, we
  776. // can't apply an opacity filter to the glyph element, because IE8m will render
  777. // the partially transparent pixels of the glyph as black. To work around this,
  778. // we emulate the approximate color that the glyph would have if it had opacity
  779. // applied by mixing the glyph color with the header's background-color.
  780. @if $include-ie {
  781. .#{$prefix}ie8 & {
  782. color: mix($ui-header-glyph-color, $ui-header-background-color, $ui-header-glyph-opacity * 100);
  783. }
  784. }
  785. }
  786. }
  787. $ui-tool-margin: 0 0 0 $ui-tool-spacing;
  788. .#{$prefix}window-header-#{$ui}-horizontal {
  789. .#{$prefix}tool-after-title {
  790. margin: $ui-tool-margin;
  791. }
  792. @if $include-rtl {
  793. .#{$prefix}rtl.#{$prefix}tool-after-title {
  794. margin: rtl($ui-tool-margin);
  795. }
  796. }
  797. .#{$prefix}tool-before-title {
  798. margin: rtl($ui-tool-margin);
  799. }
  800. @if $include-rtl {
  801. .#{$prefix}rtl.#{$prefix}tool-before-title {
  802. margin: $ui-tool-margin;
  803. }
  804. }
  805. }
  806. .#{$prefix}window-header-#{$ui}-vertical {
  807. .#{$prefix}tool-after-title {
  808. margin: rotate90($ui-tool-margin);
  809. }
  810. @if $include-rtl {
  811. .#{$prefix}rtl.#{$prefix}tool-after-title {
  812. margin: rotate270(rtl($ui-tool-margin));
  813. }
  814. }
  815. .#{$prefix}tool-before-title {
  816. margin: rotate90(rtl($ui-tool-margin));
  817. }
  818. @if $include-rtl {
  819. .#{$prefix}rtl.#{$prefix}tool-before-title {
  820. margin: rotate270($ui-tool-margin);
  821. }
  822. }
  823. }
  824. .#{$prefix}window-header-#{$ui} {
  825. .#{$prefix}tool-focus {
  826. .#{$prefix}keyboard-mode & {
  827. @include css-outline(
  828. $width: $ui-tool-focus-outline-width,
  829. $style: $ui-tool-focus-outline-style,
  830. $color: $ui-tool-focus-outline-color,
  831. $offset: $ui-tool-focus-outline-offset
  832. );
  833. }
  834. }
  835. }
  836. // !important is needed in the following rules to override dock layout's border
  837. // management rules.
  838. @if $ui-force-header-border {
  839. .#{$prefix}window-header-#{$ui} {
  840. border-width: $ui-header-border-width !important;
  841. }
  842. } @else {
  843. .#{$prefix}window-#{$ui}-collapsed .#{$prefix}window-header {
  844. border-width: $ui-header-border-width !important;
  845. }
  846. }
  847. @if $include-slicer-border-radius {
  848. .#{$prefix}nbr .#{$prefix}window-#{$ui}-collapsed .#{$prefix}window-header {
  849. border-width: 0 !important;
  850. }
  851. }
  852. // Window resizing.
  853. // If there's a border that's wider than the specified threshold (Sencha default is 2) then
  854. // embed the handles in the borders using -ve position and make resizable windows show overflow.
  855. // The dock layout should ensure that all constituent elements fit within the element.
  856. // The only exception is during animated resizing. Overflow inline style is set hidden during animation (AbstractComponent.animate)
  857. @if $ui-border-width > $border-width-threshold {
  858. .#{$prefix}window-#{$ui}-resizable {
  859. // Resizable Window element overflow must be visible for embedded handles to accept mouseovers.
  860. overflow: visible;
  861. .#{$prefix}window-handle-north-br {
  862. top: -($ui-border-width);
  863. }
  864. .#{$prefix}window-handle-south-br {
  865. bottom: -($ui-border-width);
  866. }
  867. .#{$prefix}window-handle-east-br {
  868. right: -($ui-border-width);
  869. }
  870. .#{$prefix}window-handle-west-br {
  871. left: -($ui-border-width);
  872. }
  873. .#{$prefix}window-handle-northwest-br {
  874. left: -($ui-border-width);
  875. top: -($ui-border-width);
  876. }
  877. .#{$prefix}window-handle-northeast-br {
  878. right: -($ui-border-width);
  879. top: -($ui-border-width);
  880. }
  881. .#{$prefix}window-handle-southeast-br {
  882. right: -($ui-border-width);
  883. bottom: -($ui-border-width);
  884. }
  885. .#{$prefix}window-handle-southwest-br {
  886. left: -($ui-border-width);
  887. bottom: -($ui-border-width);
  888. }
  889. }
  890. }
  891. @if $ui-include-border-management-rules {
  892. @include border-management(
  893. $parent-cls: window-#{$ui},
  894. $border-width: $ui-wrap-border-width,
  895. $border-color: $ui-wrap-border-color
  896. );
  897. }
  898. }