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