_panel.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. /**
  2. * Create the base structure of an Ext.Panel
  3. * @member Ext.panel.Panel
  4. */
  5. @mixin extjs-panel {
  6. .#{$prefix}panel,
  7. .#{$prefix}plain {
  8. overflow: hidden;
  9. position: relative;
  10. }
  11. @if $include-ie {
  12. // Workaround for disappearing right edge in IE6
  13. .#{$prefix}ie {
  14. .#{$prefix}panel-header,
  15. .#{$prefix}panel-header-tl,
  16. .#{$prefix}panel-header-tc,
  17. .#{$prefix}panel-header-tr,
  18. .#{$prefix}panel-header-ml,
  19. .#{$prefix}panel-header-mc,
  20. .#{$prefix}panel-header-mr,
  21. .#{$prefix}panel-header-bl,
  22. .#{$prefix}panel-header-bc,
  23. .#{$prefix}panel-header-br {
  24. zoom: 1;
  25. }
  26. }
  27. // Fix for IE8 clipping. EXTJSIV-1553
  28. .#{$prefix}ie8 {
  29. td.#{$prefix}frame-mc {
  30. vertical-align: top;
  31. }
  32. }
  33. }
  34. //panel header
  35. .#{$prefix}panel-header-horizontal {
  36. padding: $panel-header-padding;
  37. }
  38. .#{$prefix}panel-header-vertical {
  39. padding: $panel-header-vertical-padding;
  40. }
  41. .#{$prefix}panel-header-icon,
  42. .#{$prefix}window-header-icon {
  43. width: $panel-header-icon-width;
  44. height: $panel-header-icon-height;
  45. background-repeat:no-repeat;
  46. background-position:0 0;
  47. vertical-align:middle;
  48. margin-right:4px;
  49. }
  50. .#{$prefix}vertical {
  51. .#{$prefix}panel-header-icon,
  52. .#{$prefix}window-header-icon {
  53. margin: 0 0 4px;
  54. }
  55. }
  56. .#{$prefix}panel-header-draggable,
  57. .#{$prefix}panel-header-draggable .#{$prefix}panel-header-text,
  58. .#{$prefix}window-header-draggable,
  59. .#{$prefix}window-header-draggable .#{$prefix}window-header-text{
  60. cursor: move;
  61. }
  62. // A ghost is just a Panel. The only extra it needs is opacity.
  63. // TODO: Make opacity a variable
  64. .#{$prefix}panel-ghost, .#{$prefix}window-ghost {
  65. @include opacity(0.65);
  66. cursor: move;
  67. }
  68. .#{$prefix}panel-header-horizontal, .#{$prefix}window-header-horizontal, .#{$prefix}btn-group-header-horizontal {
  69. .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
  70. width: 100%;
  71. }
  72. }
  73. .#{$prefix}panel-header-vertical, .#{$prefix}window-header-vertical, .#{$prefix}btn-group-header-vertical {
  74. .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
  75. height: 100%;
  76. }
  77. }
  78. .#{$prefix}panel-header-text-container {
  79. overflow: hidden;
  80. -o-text-overflow: ellipsis;
  81. text-overflow: ellipsis;
  82. }
  83. .#{$prefix}panel-header-text {
  84. @include no-select;
  85. white-space: nowrap;
  86. }
  87. .#{$prefix}panel-header-left,
  88. .#{$prefix}panel-header-right {
  89. .#{$prefix}vml-base {
  90. left: -3px !important;
  91. }
  92. }
  93. //panel body
  94. .#{$prefix}panel-body {
  95. overflow: hidden;
  96. position: relative;
  97. font-size: $panel-body-font-size;
  98. }
  99. .#{$prefix}panel-header-vertical {
  100. .#{$prefix}surface {
  101. padding-left: 1px;
  102. }
  103. }
  104. .#{$prefix}opera,
  105. .#{$prefix}strict .#{$prefix}ie9 {
  106. .#{$prefix}panel-header-vertical {
  107. .#{$prefix}surface {
  108. padding-left: 2px;
  109. }
  110. }
  111. }
  112. .#{$prefix}panel-collapsed {
  113. .#{$prefix}panel-header-collapsed-border-top {
  114. border-bottom-width: $panel-header-border-width !important;
  115. }
  116. .#{$prefix}panel-header-collapsed-border-right {
  117. border-left-width: $panel-header-border-width !important;
  118. }
  119. .#{$prefix}panel-header-collapsed-border-bottom {
  120. border-top-width: $panel-header-border-width !important;
  121. }
  122. .#{$prefix}panel-header-collapsed-border-left {
  123. border-right-width: $panel-header-border-width !important;
  124. }
  125. }
  126. @if not $supports-gradients or $compile-all {
  127. .#{$prefix}nlg .#{$prefix}panel-header-vertical {
  128. .#{$prefix}frame-mc {
  129. background-repeat: repeat-y;
  130. }
  131. }
  132. }
  133. @if $include-panel-uis == true {
  134. @include extjs-panel-ui(
  135. 'default',
  136. $ui-base-color: $panel-base-color,
  137. $ui-border-width: $panel-border-width,
  138. $ui-border-color: $panel-border-color,
  139. $ui-border-radius: $panel-border-radius,
  140. $ui-header-color: $panel-header-color,
  141. $ui-header-font-size: $panel-header-font-size,
  142. $ui-header-font-weight: $panel-header-font-weight,
  143. $ui-header-border-color: $panel-header-border-color,
  144. $ui-header-background-color: $panel-header-background-color,
  145. $ui-header-background-gradient: $panel-header-background-gradient,
  146. $ui-body-color: $panel-body-color,
  147. $ui-body-border-color: $panel-body-border-color,
  148. $ui-body-border-width: 1px,
  149. $ui-body-background-color: $panel-body-background-color
  150. );
  151. @include extjs-panel-ui(
  152. 'default-framed',
  153. $ui-base-color: $panel-base-color,
  154. $ui-border-width: $panel-frame-border-width,
  155. $ui-border-color: $panel-frame-border-color,
  156. $ui-border-radius: $panel-frame-border-radius,
  157. $ui-header-color: $panel-header-color,
  158. $ui-header-font-size: $panel-header-font-size,
  159. $ui-header-font-weight: $panel-header-font-weight,
  160. $ui-header-border-color: $panel-frame-border-color,
  161. $ui-header-background-color: $panel-header-background-color,
  162. $ui-header-background-gradient: $panel-header-background-gradient,
  163. $ui-body-color: $panel-body-color,
  164. $ui-body-border-color: $panel-body-border-color,
  165. $ui-body-border-width: 0,
  166. $ui-body-background-color: $panel-frame-background-color,
  167. $ui-image-label-with-border-radius: 'default'
  168. );
  169. }
  170. .#{$prefix}panel-header-plain,
  171. .#{$prefix}panel-body-plain {
  172. border: 0;
  173. padding: 0;
  174. }
  175. }
  176. /**
  177. * Creates a visual theme for an Ext.Panel
  178. * @member Ext.panel.Panel
  179. */
  180. @mixin extjs-panel-ui(
  181. $ui-label,
  182. $ui-base-color: null,
  183. $ui-border-color: null,
  184. $ui-border-radius: null,
  185. $ui-border-width: 0,
  186. $ui-header-color: null,
  187. $ui-header-font-family: $panel-header-font-family,
  188. $ui-header-font-size: $panel-header-font-size,
  189. $ui-header-font-weight: $panel-header-font-weight,
  190. $ui-header-line-height: $panel-header-line-height,
  191. $ui-header-border-color: $ui-border-color,
  192. $ui-header-background-color: null,
  193. $ui-header-background-gradient: matte,
  194. $ui-header-inner-border-color: null,
  195. $ui-body-color: null,
  196. $ui-body-border-color: null,
  197. $ui-body-border-width: null,
  198. $ui-body-border-style: solid,
  199. $ui-body-background-color: null,
  200. $ui-body-font-size: null,
  201. $ui-body-font-weight: null,
  202. // optional image label to use when background header images are required (no linear-gradient),
  203. // but border-radius is supported (no framing els) e.g. IE9.
  204. $ui-image-label-with-border-radius: null
  205. ){
  206. @if $ui-base-color != null {
  207. @if $ui-border-color == null { $ui-border-color: $ui-base-color; }
  208. @if $ui-header-color == null { $ui-header-color: #fff; }
  209. @if $ui-header-background-color == null { $ui-header-background-color: lighten($ui-base-color, 15); }
  210. }
  211. @if $ui-header-inner-border-color == null and $ui-header-background-color != null {
  212. $ui-header-inner-border-color: lighten($ui-header-background-color, 10);
  213. }
  214. .#{$prefix}panel-#{$ui-label} {
  215. @if $ui-border-color != null { border-color: $ui-border-color; }
  216. }
  217. // header
  218. .#{$prefix}panel-header-#{$ui-label} {
  219. @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
  220. @if $ui-header-border-color != null {
  221. border-color: $ui-header-border-color;
  222. border-width: $panel-header-border-width;
  223. border-style: $panel-header-border-style;
  224. }
  225. @if $supports-gradients or $compile-all {
  226. @if $ui-header-background-color != null { @include background-gradient($ui-header-background-color, $ui-header-background-gradient); }
  227. @if $panel-header-inner-border and $ui-header-inner-border-color != null {
  228. @include inner-border(
  229. $width: $panel-header-inner-border-width,
  230. $color: $ui-header-inner-border-color
  231. );
  232. }
  233. }
  234. }
  235. // header background images
  236. @if $ui-header-background-color != null and $ui-header-background-gradient != null {
  237. @if not $supports-gradients or $compile-all {
  238. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-top {
  239. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-top-bg.gif');
  240. }
  241. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
  242. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-bottom-bg.gif');
  243. }
  244. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-left {
  245. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-left-bg.gif');
  246. }
  247. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
  248. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-right-bg.gif');
  249. }
  250. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
  251. background-position: top right;
  252. }
  253. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
  254. background-position: bottom left;
  255. }
  256. @if $ui-border-radius != null {
  257. .#{$prefix}nbr {
  258. // If framing elements are used to achieve rounded corners remove the background image from the header element since the framing elements
  259. // already have the background image, and a background image on the main header element bleeds through the corner framing elements.
  260. .#{$prefix}panel-header-#{$ui-label} {
  261. background-image: none;
  262. }
  263. }
  264. }
  265. @if $ui-image-label-with-border-radius != null {
  266. // IE9 strict, Opera < 11.10, and Safari 3 are the only currently supported browsers that support border-radius, but do not support linear-gradient.
  267. .#{$prefix}strict .#{$prefix}ie9,
  268. .#{$prefix}nlg.#{$prefix}opera,
  269. .#{$prefix}nlg.#{$prefix}safari {
  270. .#{$prefix}panel-header-#{$ui-label}-top {
  271. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-image-label-with-border-radius}-top-bg.gif');
  272. }
  273. .#{$prefix}panel-header-#{$ui-label}-bottom {
  274. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-image-label-with-border-radius}-bottom-bg.gif');
  275. }
  276. .#{$prefix}panel-header-#{$ui-label}-left {
  277. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-image-label-with-border-radius}-left-bg.gif');
  278. }
  279. .#{$prefix}panel-header-#{$ui-label}-right {
  280. background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-image-label-with-border-radius}-right-bg.gif');
  281. }
  282. }
  283. }
  284. }
  285. }
  286. // header text
  287. .#{$prefix}panel-header-text-#{$ui-label} {
  288. @if $ui-header-color != null { color: $ui-header-color; }
  289. @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
  290. @if $ui-header-font-weight != null { font-weight: $ui-header-font-weight; }
  291. @if $ui-header-font-family != null { font-family: $ui-header-font-family; }
  292. @if $ui-header-line-height != null { line-height: $ui-header-line-height; }
  293. }
  294. // body
  295. .#{$prefix}panel-body-#{$ui-label} {
  296. @if $ui-body-background-color != null { background: $ui-body-background-color; }
  297. @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
  298. @if $ui-body-color != null { color: $ui-body-color; }
  299. @if $ui-body-font-size != null { font-size: $ui-body-font-size; }
  300. @if $ui-body-font-weight != null { font-size: $ui-body-font-weight; }
  301. @if $ui-body-border-width != null {
  302. border-width: $ui-body-border-width;
  303. @if $ui-body-border-style != null { border-style: $ui-body-border-style; }
  304. }
  305. }
  306. .#{$prefix}panel-collapsed {
  307. .#{$prefix}window-header-#{$ui-label},
  308. .#{$prefix}panel-header-#{$ui-label} {
  309. @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
  310. }
  311. }
  312. .#{$prefix}panel-header-#{$ui-label}-vertical {
  313. @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
  314. }
  315. @if $ui-base-color != null {
  316. @if $supports-gradients or $compile-all {
  317. .#{$prefix}panel-header-#{$ui-label}-left,
  318. .#{$prefix}panel-header-#{$ui-label}-right {
  319. @include background-gradient($ui-header-background-color, $ui-header-background-gradient, right);
  320. }
  321. }
  322. }
  323. @if $ui-border-radius != null {
  324. @include x-frame(
  325. 'panel',
  326. $ui: '#{$ui-label}',
  327. /* Radius, width, padding and background-color */
  328. $border-radius : $ui-border-radius,
  329. $border-width : $ui-border-width,
  330. $padding : $panel-frame-padding,
  331. $background-color: $ui-body-background-color
  332. );
  333. @include x-frame('panel-header', '#{$ui-label}-top', top($ui-border-radius) right($ui-border-radius) 0 0, top($ui-border-width) right($ui-border-width) 0 left($ui-border-width), $panel-header-padding, $ui-header-background-color, $ui-header-background-gradient);
  334. @include x-frame('panel-header', '#{$ui-label}-right', 0 right($ui-border-radius) bottom($ui-border-radius) 0, top($ui-border-width) right($ui-border-width) bottom($ui-border-width) 0, $panel-header-vertical-padding, $ui-header-background-color, $ui-header-background-gradient, false, right);
  335. @include x-frame('panel-header', '#{$ui-label}-bottom', 0 0 bottom($ui-border-radius) left($ui-border-radius), 0 right($ui-border-width) bottom($ui-border-width) left($ui-border-width), $panel-header-padding, $ui-header-background-color, $ui-header-background-gradient);
  336. @include x-frame('panel-header', '#{$ui-label}-left', top($ui-border-radius) 0 0 left($ui-border-radius), top($ui-border-width) 0 bottom($ui-border-width) left($ui-border-width), $panel-header-vertical-padding, $ui-header-background-color, $ui-header-background-gradient, false, right);
  337. .#{$prefix}panel-header-#{$ui-label}-top {
  338. @include inner-border(1px 1px 0 1px, $ui-header-inner-border-color);
  339. }
  340. .#{$prefix}panel-header-#{$ui-label}-right {
  341. @include inner-border(1px 1px 1px 0, $ui-header-inner-border-color);
  342. }
  343. .#{$prefix}panel-header-#{$ui-label}-bottom {
  344. @include inner-border(0 1px 1px 1px, $ui-header-inner-border-color);
  345. }
  346. .#{$prefix}panel-header-#{$ui-label}-left {
  347. @include inner-border(1px 0 1px 1px, $ui-header-inner-border-color);
  348. }
  349. } @else {
  350. .#{$prefix}panel-collapsed {
  351. .#{$prefix}panel-header-#{$ui-label}-top {
  352. @include border-bottom-radius($ui-border-radius);
  353. }
  354. .#{$prefix}panel-header-#{$ui-label}-right {
  355. @include border-left-radius($ui-border-radius);
  356. }
  357. .#{$prefix}panel-header-#{$ui-label}-bottom {
  358. @include border-top-radius($ui-border-radius);
  359. }
  360. .#{$prefix}panel-header-#{$ui-label}-left {
  361. @include border-right-radius($ui-border-radius);
  362. }
  363. }
  364. .#{$prefix}panel-header-#{$ui-label}-top {
  365. @include inner-border(1px 0 0 0, $ui-header-inner-border-color);
  366. }
  367. .#{$prefix}panel-header-#{$ui-label}-right {
  368. @include inner-border(0 1px 0 0, $ui-header-inner-border-color);
  369. }
  370. .#{$prefix}panel-header-#{$ui-label}-bottom {
  371. @include inner-border(0 0 1px, $ui-header-inner-border-color);
  372. }
  373. .#{$prefix}panel-header-#{$ui-label}-left {
  374. @include inner-border(0 0 0 1px, $ui-header-inner-border-color);
  375. }
  376. }
  377. @if $ui-border-radius != null {
  378. .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-top {
  379. border-bottom-width: 1px !important;
  380. }
  381. .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-right {
  382. border-left-width: 1px !important;
  383. }
  384. .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-bottom {
  385. border-top-width: 1px !important;
  386. }
  387. .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-left {
  388. border-right-width: 1px !important;
  389. }
  390. .#{$prefix}panel-header-#{$ui-label}-collapsed {
  391. @include border-radius($ui-border-radius);
  392. }
  393. @include x-frame('panel-header', '#{$ui-label}-collapsed-top', top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, $panel-header-padding, $ui-header-background-color, $ui-header-background-gradient);
  394. @include x-frame('panel-header', '#{$ui-label}-collapsed-right', top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, $panel-header-vertical-padding, $ui-header-background-color, $ui-header-background-gradient, false, right);
  395. @include x-frame('panel-header', '#{$ui-label}-collapsed-bottom', top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, $panel-header-padding, $ui-header-background-color, $ui-header-background-gradient);
  396. @include x-frame('panel-header', '#{$ui-label}-collapsed-left', top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, $panel-header-vertical-padding, $ui-header-background-color, $ui-header-background-gradient, false, right);
  397. }
  398. //background positioning of images
  399. .#{$prefix}panel-header-#{$ui-label}-right-tc,
  400. .#{$prefix}panel-header-#{$ui-label}-right-mc,
  401. .#{$prefix}panel-header-#{$ui-label}-right-bc {
  402. background-position: right 0;
  403. }
  404. .#{$prefix}panel-header-#{$ui-label}-bottom-tc,
  405. .#{$prefix}panel-header-#{$ui-label}-bottom-mc,
  406. .#{$prefix}panel-header-#{$ui-label}-bottom-bc {
  407. background-position: 0 bottom;
  408. }
  409. }