_window.scss 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /**
  2. * Creates the base structure of an Ext.Window
  3. * @member Ext.window.Window
  4. */
  5. @mixin extjs-window {
  6. .#{$prefix}window {
  7. outline: none;
  8. overflow: hidden;
  9. .#{$prefix}window-wrap {
  10. position: relative;
  11. }
  12. }
  13. .#{$prefix}window-body {
  14. position: relative;
  15. border-style: $window-body-border-style;
  16. overflow: hidden;
  17. }
  18. //maximized window
  19. .#{$prefix}window-maximized {
  20. .#{$prefix}window-wrap {
  21. .#{$prefix}window-header {
  22. @include important-no-border-radius;
  23. }
  24. }
  25. }
  26. .#{$prefix}window-header-top {
  27. margin-bottom: -2px;
  28. }
  29. .#{$prefix}window-header-body-horizontal {
  30. margin-top: -1px;
  31. }
  32. .#{$prefix}window-header-bottom {
  33. margin-top: -1px;
  34. margin-bottom: -1px;
  35. }
  36. .#{$prefix}window-header-left {
  37. margin-right: -1px;
  38. }
  39. .#{$prefix}window-header-right {
  40. margin-left: -1px;
  41. }
  42. .#{$prefix}window-header-vertical {
  43. .#{$prefix}surface {
  44. padding-left: 1px;
  45. }
  46. }
  47. // collapsed window header styles
  48. .#{$prefix}window-collapsed {
  49. .#{$prefix}window-header-vertical {
  50. @include border-radius(5px);
  51. }
  52. .#{$prefix}window-header-horizontal {
  53. @include border-radius(5px);
  54. }
  55. // Padding changes for collapsed headers.
  56. .#{$prefix}window-header-left {
  57. padding-right: 5px !important;
  58. margin-right: 0;
  59. }
  60. .#{$prefix}window-header-right {
  61. padding-left: 5px !important;
  62. margin-left: 0;
  63. }
  64. .#{$prefix}window-header-top {
  65. padding-bottom: 5px !important;
  66. margin-bottom: -1px;
  67. }
  68. .#{$prefix}window-header-bottom {
  69. padding-top: 5px !important;
  70. margin-top: 0;
  71. }
  72. }
  73. .#{$prefix}window-header-left,
  74. .#{$prefix}window-header-right {
  75. .#{$prefix}vml-base {
  76. left: -3px !important;
  77. }
  78. }
  79. .#{$prefix}opera,
  80. .#{$prefix}strict .#{$prefix}ie9 {
  81. .#{$prefix}window-header-vertical {
  82. .#{$prefix}surface {
  83. padding-left: 2px;
  84. }
  85. }
  86. }
  87. .#{$prefix}window-header-text-container {
  88. overflow: hidden;
  89. -o-text-overflow: ellipsis;
  90. text-overflow: ellipsis;
  91. }
  92. .#{$prefix}window-header-text {
  93. @include no-select;
  94. white-space: nowrap;
  95. }
  96. @include extjs-window-ui(
  97. 'default',
  98. $ui-border-radius: $window-border-radius,
  99. $ui-border-color: $window-border-color,
  100. $ui-inner-border-color: $window-inner-border-color,
  101. $ui-header-color: $window-header-color,
  102. $ui-body-border-color: $window-body-border-color,
  103. $ui-body-background-color: $window-body-background-color,
  104. $ui-body-color: $window-body-color,
  105. $ui-background-color: $window-background-color
  106. );
  107. .#{$prefix}window-body-plain {
  108. background: transparent;
  109. }
  110. }
  111. /**
  112. * Creates a visual theme for an Ext.Panel
  113. * @member Ext.window.Window
  114. */
  115. @mixin extjs-window-ui(
  116. $ui-label,
  117. $ui-padding: null,
  118. $ui-border-radius: null,
  119. $ui-border-color: null,
  120. $ui-inner-border-color: null,
  121. $ui-header-color: null,
  122. $ui-header-font-size: $window-header-font-size,
  123. $ui-header-font-weight: $window-header-font-weight,
  124. $ui-body-border-color: null,
  125. $ui-body-background-color: null,
  126. $ui-body-color: null,
  127. $ui-background-color: null
  128. ){
  129. $ui-header-text-height: $window-header-line-height;
  130. .#{$prefix}window-#{$ui-label} {
  131. @if $ui-border-color != null { border-color: $ui-border-color; }
  132. @if $ui-border-radius != null { @include border-radius($ui-border-radius); }
  133. @if $ui-inner-border-color != null { @include inner-border($window-inner-border-width, $ui-inner-border-color); }
  134. }
  135. @if $ui-border-radius != null {
  136. @include x-frame(
  137. 'window',
  138. $ui-label,
  139. $border-radius: $ui-border-radius,
  140. $border-width: $window-border-width,
  141. $padding: $ui-padding,
  142. $background-color: $ui-background-color
  143. );
  144. }
  145. .#{$prefix}window-body-#{$ui-label} {
  146. @if $ui-body-border-color !=null {
  147. border-color: $ui-body-border-color;
  148. border-width: $window-body-border-width;
  149. }
  150. @if $ui-body-background-color != null { background: $ui-body-background-color; }
  151. @if $ui-body-color != null { color: $ui-body-color; }
  152. }
  153. .#{$prefix}window-header-#{$ui-label} {
  154. @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
  155. @if $ui-border-color != null { border-color: $ui-border-color; }
  156. zoom:1;
  157. }
  158. .#{$prefix}window-header-text-#{$ui-label} {
  159. @if $ui-header-color != null { color: $ui-header-color; }
  160. @if $ui-header-font-weight != null { font-weight: $ui-header-font-weight; }
  161. line-height: $ui-header-text-height;
  162. font-family: $font-family;
  163. font-size: $ui-header-font-size;
  164. }
  165. @if $ui-border-radius != null {
  166. @include x-frame('window-header', '#{$ui-label}-top', top($ui-border-radius) right($ui-border-radius) 0 0, top($window-border-width) right($window-border-width) 0 left($window-border-width), 4px 5px 0, $ui-background-color);
  167. @include x-frame('window-header', '#{$ui-label}-right', 0 right($ui-border-radius) bottom($ui-border-radius) 0, top($window-border-width) right($window-border-width) bottom($window-border-width) 0, 5px 4px 5px 0, $ui-background-color);
  168. @include x-frame('window-header', '#{$ui-label}-bottom', 0 0 bottom($ui-border-radius) left($ui-border-radius), 0 right($window-border-width) bottom($window-border-width) left($window-border-width), 0 5px 4px, $ui-background-color);
  169. @include x-frame('window-header', '#{$ui-label}-left', top($ui-border-radius) 0 0 left($ui-border-radius), top($window-border-width) 0 bottom($window-border-width) left($window-border-width), 5px 0px 5px 4px, $ui-background-color);
  170. // collapsed window header styles
  171. @include x-frame('window-header', '#{$ui-label}-collapsed-top', $ui-border-radius, $window-border-width, 4px 5px 4px, $ui-background-color);
  172. @include x-frame('window-header', '#{$ui-label}-collapsed-right', $ui-border-radius, $window-border-width, 5px 4px, $ui-background-color);
  173. @include x-frame('window-header', '#{$ui-label}-collapsed-bottom', $ui-border-radius, $window-border-width, 4px 5px 4px, $ui-background-color);
  174. @include x-frame('window-header', '#{$ui-label}-collapsed-left', $ui-border-radius, $window-border-width, 5px 4px, $ui-background-color);
  175. }
  176. .#{$prefix}window-header-#{$ui-label}-top {
  177. @include inner-border(1px 1px 0, $ui-inner-border-color);
  178. }
  179. .#{$prefix}window-header-#{$ui-label}-right {
  180. @include inner-border(1px 1px 1px 0, $ui-inner-border-color);
  181. }
  182. .#{$prefix}window-header-#{$ui-label}-bottom {
  183. @include inner-border(0px 1px 1px, $ui-inner-border-color);
  184. }
  185. .#{$prefix}window-header-#{$ui-label}-left {
  186. @include inner-border(1px 0 1px 1px, $ui-inner-border-color);
  187. }
  188. }