_panel.scss 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /**
  2. * @class Ext.Panel
  3. * Used to create the base structure of an Ext.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. // @tag iezoomhack
  14. // .#{$prefix}ie {
  15. // .#{$prefix}panel-header,
  16. // .#{$prefix}panel-header-tl,
  17. // .#{$prefix}panel-header-tc,
  18. // .#{$prefix}panel-header-tr,
  19. // .#{$prefix}panel-header-ml,
  20. // .#{$prefix}panel-header-mc,
  21. // .#{$prefix}panel-header-mr,
  22. // .#{$prefix}panel-header-bl,
  23. // .#{$prefix}panel-header-bc,
  24. // .#{$prefix}panel-header-br {
  25. // zoom: 1;
  26. // }
  27. // }
  28. // Fix for IE8 clipping. EXTJSIV-1553
  29. .#{$prefix}ie8 {
  30. td.#{$prefix}frame-mc {
  31. vertical-align: top;
  32. }
  33. }
  34. }
  35. .#{$prefix}panel {
  36. @include border-bottom-radius($panel-body-radius);
  37. border: 0 solid $stroke-color;
  38. background-color: $content-color;
  39. @include border-radius($panel-border-radius);
  40. @include background-clip(padding-box); // Used to improve jaggies of overlapping border-radius
  41. }
  42. .#{$prefix}panel-default.#{$prefix}tab-panel {
  43. @include border-radius(0);
  44. }
  45. //panel header
  46. .#{$prefix}panel-header {
  47. padding: $panel-header-padding;
  48. border: 0 solid $neutral-color;
  49. border-bottom-width: 0;
  50. .#{$prefix}panel-header-body,
  51. .#{$prefix}panel-header-body > .x-box-inner {
  52. overflow: visible;
  53. }
  54. }
  55. .#{$prefix}panel-header-icon,
  56. .#{$prefix}window-header-icon {
  57. width:16px;
  58. height:16px;
  59. background-repeat:no-repeat;
  60. background-position:0 0;
  61. vertical-align:middle;
  62. margin-right:4px;
  63. margin-top:-1px;
  64. margin-bottom:-1px;
  65. }
  66. .#{$prefix}panel-header-draggable,
  67. .#{$prefix}panel-header-draggable .#{$prefix}panel-header-text,
  68. .#{$prefix}window-header-draggable,
  69. .#{$prefix}window-header-draggable .#{$prefix}window-header-text{
  70. cursor: move;
  71. }
  72. // A ghost is just a Panel. The only extra it needs is opacity.
  73. // TODO: Make opacity a variable
  74. .#{$prefix}panel-ghost, .#{$prefix}window-ghost {
  75. @include opacity(0.65);
  76. cursor: move;
  77. }
  78. .#{$prefix}panel-header-horizontal, .#{$prefix}window-header-horizontal, .#{$prefix}btn-group-header-horizontal {
  79. .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
  80. width: 100%;
  81. }
  82. }
  83. .#{$prefix}panel-header-vertical, .#{$prefix}window-header-vertical, .#{$prefix}btn-group-header-vertical {
  84. .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
  85. height: 100%;
  86. }
  87. }
  88. .#{$prefix}panel-header-text-container {
  89. @extend .overflow-ellipsis;
  90. }
  91. .#{$prefix}panel-header-text {
  92. @extend .no-select;
  93. }
  94. .#{$prefix}panel-header-left,
  95. .#{$prefix}panel-header-right {
  96. .#{$prefix}vml-base {
  97. left: -3px !important;
  98. }
  99. }
  100. //panel body
  101. .#{$prefix}panel-body {
  102. overflow: hidden;
  103. position: relative;
  104. @include background-clip(padding-box);
  105. }
  106. // Framed panel
  107. .#{$prefix}panel-default-framed {
  108. padding: $panel-frame-padding;
  109. .#{$prefix}panel-body {
  110. @include border-radius($panel-body-radius);
  111. border: 0;
  112. }
  113. }
  114. .#{$prefix}panel-hasheader-top,
  115. .#{$prefix}window-hasheader-top {
  116. padding-top: 0 !important;
  117. }
  118. .#{$prefix}panel-hasheader-bottom,
  119. .#{$prefix}window-hasheader-bottom {
  120. padding-bottom: 0 !important;
  121. }
  122. .#{$prefix}panel-hasheader-left,
  123. .#{$prefix}window-hasheader-left {
  124. padding-left: 0 !important;
  125. }
  126. .#{$prefix}panel-hasheader-right,
  127. .#{$prefix}window-hasheader-right {
  128. padding-right: 0 !important;
  129. }
  130. // Vertical/horizontal headers
  131. .#{$prefix}panel-header-vertical .#{$prefix}surface {
  132. margin-top: 2px;
  133. }
  134. .#{$prefix}panel-header-plain-vertical .#{$prefix}surface {
  135. margin-top: 0;
  136. }
  137. // .#{$prefix}panel-collapsed {
  138. // .#{$prefix}panel-header-collapsed-border-top {
  139. // border-bottom-width: 1px !important;
  140. // }
  141. // .#{$prefix}panel-header-collapsed-border-right {
  142. // border-left-width: 1px !important;
  143. // }
  144. // .#{$prefix}panel-header-collapsed-border-bottom {
  145. // border-top-width: 1px !important;
  146. // }
  147. // .#{$prefix}panel-header-collapsed-border-left {
  148. // border-right-width: 1px !important;
  149. // }
  150. // }
  151. @if not $supports-gradients or $compile-all {
  152. .#{$prefix}nlg .#{$prefix}panel-header-vertical {
  153. .#{$prefix}frame-mc {
  154. background-repeat: repeat-y;
  155. }
  156. }
  157. }
  158. @if $include-panel-uis == true {
  159. @include extjs-panel-ui(
  160. 'default',
  161. $ui-base-color: $panel-base-color,
  162. $ui-border-width: $panel-border-width,
  163. $ui-border-color: $panel-border-color,
  164. $ui-border-radius: $panel-border-radius,
  165. $ui-header-color: $panel-header-color,
  166. $ui-header-font-size: $panel-header-font-size,
  167. $ui-header-font-weight: $panel-header-font-weight,
  168. $ui-header-border-color: $panel-header-border-color,
  169. $ui-header-border-width: $panel-header-border-width,
  170. $ui-header-background-color: $panel-header-background-color,
  171. $ui-header-background-gradient: $panel-header-background-gradient,
  172. $ui-body-color: $panel-body-color,
  173. $ui-body-border-width: $panel-body-border-width,
  174. $ui-body-border-color: $panel-body-border-color,
  175. $ui-body-background-color: $panel-body-background-color
  176. );
  177. @include extjs-panel-ui(
  178. 'default-framed',
  179. $ui-base-color: $panel-base-color,
  180. $ui-border-width: $panel-frame-border-width,
  181. $ui-border-color: $panel-frame-border-color,
  182. $ui-border-radius: $panel-frame-border-radius,
  183. $ui-header-color: $panel-header-color,
  184. $ui-header-font-size: $panel-header-font-size,
  185. $ui-header-font-weight: $panel-header-font-weight,
  186. $ui-header-border-color: $panel-frame-border-color,
  187. $ui-header-background-color: $panel-header-background-color,
  188. $ui-header-background-gradient: $panel-header-background-gradient,
  189. $ui-body-color: $panel-frame-body-color,
  190. $ui-body-border-color: $panel-body-border-color,
  191. $ui-body-background-color: $panel-body-background-color
  192. );
  193. }
  194. .#{$prefix}panel-header-plain,
  195. .#{$prefix}panel-body-plain {
  196. border: 0;
  197. padding: 0;
  198. }
  199. }
  200. /**
  201. * @class Ext.Panel
  202. * Used to create a visual theme for an Ext.Panel
  203. */
  204. @mixin extjs-panel-ui(
  205. $ui-label,
  206. $ui-base-color: null,
  207. $ui-border-color: null,
  208. $ui-border-radius: null,
  209. $ui-border-width: 0,
  210. $ui-header-color: null,
  211. $ui-header-font-family: $panel-header-font-family,
  212. $ui-header-font-size: $panel-header-font-size,
  213. $ui-header-font-weight: $panel-header-font-weight,
  214. $ui-header-border-width: $panel-header-border-width,
  215. $ui-header-border-color: $ui-border-color,
  216. $ui-header-background-color: null,
  217. $ui-header-background-gradient: matte,
  218. $ui-header-inner-border-color: null,
  219. $ui-body-color: null,
  220. $ui-body-border-color: null,
  221. $ui-body-border-width: null,
  222. $ui-body-border-style: solid,
  223. $ui-body-background-color: null,
  224. $ui-body-font-size: null,
  225. $ui-body-font-weight: null
  226. ){
  227. @if $ui-base-color != null {
  228. @if $ui-border-color == null { $ui-border-color: $ui-base-color; }
  229. @if $ui-header-color == null { $ui-header-color: #fff; }
  230. @if $ui-header-background-color == null { $ui-header-background-color: lighten($ui-base-color, 15); }
  231. }
  232. @if $ui-header-inner-border-color == null and $ui-header-background-color != null {
  233. $ui-header-inner-border-color: lighten($ui-header-background-color, 10);
  234. }
  235. .#{$prefix}panel-#{$ui-label} {
  236. @if $ui-border-color != null { border-color: $ui-border-color; }
  237. background: $ui-base-color;
  238. @if $ui-border-radius != null {
  239. @include border-radius($ui-border-radius);
  240. }
  241. @if $ui-header-border-width != null {
  242. .#{$prefix}panel-header-collapsed-border-top {
  243. border-bottom-width: $ui-header-border-width !important;
  244. }
  245. .#{$prefix}panel-header-collapsed-border-right {
  246. border-left-width: $ui-header-border-width !important;
  247. }
  248. .#{$prefix}panel-header-collapsed-border-bottom {
  249. border-top-width: $ui-header-border-width !important;
  250. }
  251. .#{$prefix}panel-header-collapsed-border-left {
  252. border-right-width: $ui-header-border-width !important;
  253. }
  254. }
  255. }
  256. // header
  257. .#{$prefix}panel-header-#{$ui-label} {
  258. .#{$prefix}panel-header-text-container {
  259. @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
  260. // @if $include-panel-highlights {
  261. // @include inset-by-background($panel-header-background-color);
  262. // }
  263. line-height: 1.2em;
  264. @extend .bigtext;
  265. }
  266. @if $ui-header-border-color != null {
  267. border-color: $ui-header-border-color;
  268. border-width: $panel-border-width;
  269. border-style: $panel-header-border-style;
  270. }
  271. @if $ui-header-border-width != null {
  272. border-width: $ui-header-border-width;
  273. }
  274. @if $supports-gradients or $compile-all {
  275. // @if $ui-header-background-color != null { @include background-gradient(linear-gradient(top, $ui-header-background-color, $ui-header-background-color)); }
  276. @if $ui-header-background-color != null { @include background-image(linear-gradient(top, lighten($ui-header-background-color, 5%), $ui-header-background-color 100%)); }
  277. @if $panel-header-inner-border and $ui-header-inner-border-color != null {
  278. // @include inner-border(
  279. // $width: $panel-header-inner-border-width,
  280. // $color: $ui-header-inner-border-color
  281. // );
  282. }
  283. }
  284. }
  285. // header background images
  286. // @todo add these back in
  287. // @if $ui-header-background-color != null and $ui-header-background-gradient != null {
  288. // @if not $supports-gradients or $compile-all {
  289. // .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-top {
  290. // background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-top-bg.gif');
  291. // }
  292. // .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
  293. // background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-bottom-bg.gif');
  294. // }
  295. // .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-left {
  296. // background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-left-bg.gif');
  297. // }
  298. // .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
  299. // background-image: theme-background-image($theme-name, 'panel-header/panel-header-#{$ui-label}-right-bg.gif');
  300. // }
  301. // }
  302. // }
  303. // header text
  304. .#{$prefix}panel-header-#{$ui-label} .#{$prefix}panel-header-text-container {
  305. @if $ui-header-color != null { color: $ui-header-color; }
  306. @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
  307. @if $ui-header-font-weight != null { font-weight: $ui-header-font-weight; }
  308. @if $ui-header-font-family != null { font-family: $ui-header-font-family; }
  309. }
  310. // body
  311. .#{$prefix}panel-body-#{$ui-label} {
  312. @if $ui-body-background-color != null { background: $ui-body-background-color; }
  313. @if $ui-body-border-width != null { margin: $ui-body-border-width; }
  314. @if $ui-body-color != null { color: $ui-body-color; }
  315. @if $ui-body-font-size != null { font-size: $ui-body-font-size; }
  316. @if $ui-body-font-weight != null { font-size: $ui-body-font-weight; }
  317. }
  318. .#{$prefix}panel-collapsed {
  319. .#{$prefix}window-header-#{$ui-label},
  320. .#{$prefix}panel-header-#{$ui-label} {
  321. @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
  322. }
  323. }
  324. .#{$prefix}panel-header-#{$ui-label}-vertical {
  325. @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
  326. }
  327. // @if $ui-base-color != null {
  328. // @if $supports-gradients or $compile-all {
  329. // .#{$prefix}panel-header-#{$ui-label}-left,
  330. // .#{$prefix}panel-header-#{$ui-label}-right {
  331. // @include background-gradient($ui-header-background-color, $ui-header-background-gradient, right);
  332. // }
  333. // }
  334. // }
  335. @if $ui-border-radius != null {
  336. // @include x-frame(
  337. // 'panel',
  338. // $ui: '#{$ui-label}',
  339. // /* Radius, width, padding and background-color */
  340. // $border-radius : $ui-border-radius,
  341. // $border-width : $ui-border-width,
  342. // $padding : $panel-frame-padding,
  343. // $background-color: $ui-base-color
  344. // );
  345. // @include x-frame('panel-header', '#{$ui-label}-top', top($ui-border-radius) right($ui-border-radius) 0 0, $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
  346. // @include x-frame('panel-header', '#{$ui-label}-right', 0 right($ui-border-radius) bottom($ui-border-radius) 0, $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
  347. // @include x-frame('panel-header', '#{$ui-label}-bottom', 0 0 bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
  348. // @include x-frame('panel-header', '#{$ui-label}-left', top($ui-border-radius) 0 0 left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
  349. .#{$prefix}panel-header-#{$ui-label}-top {
  350. @include border-top-radius($ui-border-radius);
  351. // @include inner-border(1px 1px 0 1px, $ui-header-inner-border-color);
  352. }
  353. // .#{$prefix}panel-header-#{$ui-label}-right {
  354. // @include inner-border(1px 1px 1px 0, $ui-header-inner-border-color);
  355. // }
  356. // .#{$prefix}panel-header-#{$ui-label}-bottom {
  357. // @include inner-border(0 1px 1px 1px, $ui-header-inner-border-color);
  358. // }
  359. // .#{$prefix}panel-header-#{$ui-label}-left {
  360. // @include inner-border(1px 0 1px 1px, $ui-header-inner-border-color);
  361. // }
  362. .#{$prefix}panel-collapsed {
  363. .#{$prefix}panel-header-#{$ui-label}-top {
  364. @include border-bottom-radius($ui-border-radius);
  365. }
  366. .#{$prefix}panel-header-#{$ui-label}-right {
  367. @include border-left-radius($ui-border-radius);
  368. }
  369. .#{$prefix}panel-header-#{$ui-label}-bottom {
  370. @include border-top-radius($ui-border-radius);
  371. }
  372. .#{$prefix}panel-header-#{$ui-label}-left {
  373. @include border-right-radius($ui-border-radius);
  374. }
  375. }
  376. } @else {
  377. // .#{$prefix}panel-collapsed {
  378. // .#{$prefix}panel-header-#{$ui-label}-top {
  379. // @include border-bottom-radius($ui-border-radius);
  380. // }
  381. // .#{$prefix}panel-header-#{$ui-label}-right {
  382. // @include border-left-radius($ui-border-radius);
  383. // }
  384. // .#{$prefix}panel-header-#{$ui-label}-bottom {
  385. // @include border-top-radius($ui-border-radius);
  386. // }
  387. // .#{$prefix}panel-header-#{$ui-label}-left {
  388. // @include border-right-radius($ui-border-radius);
  389. // }
  390. // }
  391. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
  392. // background-position: top right;
  393. }
  394. // .#{$prefix}panel-header-#{$ui-label}-top {
  395. // @include inner-border(1px 0 0 0, $ui-header-inner-border-color);
  396. // }
  397. // .#{$prefix}panel-header-#{$ui-label}-right {
  398. // @include inner-border(0 1px 0 0, $ui-header-inner-border-color);
  399. // }
  400. // .#{$prefix}panel-header-#{$ui-label}-bottom {
  401. // @include inner-border(0 0 1px, $ui-header-inner-border-color);
  402. // }
  403. // .#{$prefix}panel-header-#{$ui-label}-left {
  404. // @include inner-border(0 0 0 1px, $ui-header-inner-border-color);
  405. // }
  406. }
  407. .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
  408. background-position: bottom left;
  409. }
  410. @if $ui-border-radius != null {
  411. // Why does adding a border radius require a border?
  412. // .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-top {
  413. // border-bottom-width: 1px !important;
  414. // }
  415. // .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-right {
  416. // border-left-width: 1px !important;
  417. // }
  418. // .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-bottom {
  419. // border-top-width: 1px !important;
  420. // }
  421. // .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-left {
  422. // border-right-width: 1px !important;
  423. // }
  424. .#{$prefix}panel-header-#{$ui-label}-collapsed {
  425. @include border-radius($ui-border-radius);
  426. }
  427. // These
  428. // @tag deleted
  429. // @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, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
  430. // @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, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
  431. // @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, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
  432. // @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, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
  433. }
  434. //background positioning of images
  435. // @tag deleted
  436. // .#{$prefix}panel-header-#{$ui-label}-right-tc,
  437. // .#{$prefix}panel-header-#{$ui-label}-right-mc,
  438. // .#{$prefix}panel-header-#{$ui-label}-right-bc {
  439. // background-position: right 0;
  440. // }
  441. // .#{$prefix}panel-header-#{$ui-label}-bottom-tc,
  442. // .#{$prefix}panel-header-#{$ui-label}-bottom-mc,
  443. // .#{$prefix}panel-header-#{$ui-label}-bottom-bc {
  444. // background-position: 0 bottom;
  445. // }
  446. }