_panel.scss2.html 20 KB

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