_fieldset.scss.html
5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-form-FieldSet-css_mixin-extjs-form-fieldset'>/**
</span> * Creates the base structure of FieldSet.
* @member Ext.form.FieldSet
*/
@mixin extjs-form-fieldset {
.#{$prefix}fieldset {
border: $fieldset-border;
padding: $fieldset-padding;
margin-bottom: $fieldset-padding;
display: block; /* preserve margins in IE */
position: relative;
}
// Insane IE bug: Fieldset padding-top is rendered *outside* the border!
// So we transfer the padding-top to the body element.
.#{$prefix}ie .#{$prefix}fieldset {
padding-top: 0;
.#{$prefix}fieldset-body {
padding-top: $fieldset-padding;
}
}
.#{$prefix}fieldset-header-checkbox {
line-height: $fieldset-header-line-height;
}
.#{$prefix}fieldset-header {
font: $fieldset-header-font;
color: $fieldset-header-color;
padding: $fieldset-header-padding;
overflow: hidden; // fixes a webkit bug where legend elements that have floated children are not displayed
.#{$prefix}fieldset-header-text {
float: left;
padding: 1px 0;
}
.#{$prefix}fieldset-header-text-collapsible {
cursor: pointer;
}
.#{$prefix}form-item,
.#{$prefix}tool {
float: left;
margin: 1px 0 0 0;
}
.#{$prefix}form-cb-wrap {
padding: 1px 0;
font-size: 0;
line-height: 0;
}
}
.#{$prefix}fieldset-with-title {
.#{$prefix}fieldset-header-checkbox,
.#{$prefix}tool {
margin-right: 3px;
}
}
// Use Webkit's built-in fieldset legend padding which takes precedence over padding-left/right
.#{$prefix}webkit {
.#{$prefix}fieldset-header {
-webkit-padding-start: #{left($fieldset-header-padding)};
-webkit-padding-end: #{right($fieldset-header-padding)};
}
}
// opera renders an invisible border above the fieldset in addition to the normal border when the fieldset has a legend.
// To compensate for this, give the fieldset a negative top margin equal to the top border width.
@if $include-opera {
.#{$prefix}opera {
.#{$prefix}fieldset-with-legend {
margin-top: -#{top($fieldset-border-width)};
}
&.#{$prefix}mac .#{$prefix}fieldset-header-text {
padding: 2px 0 0;
}
}
}
// IE8 strict has a problem similar to opera's, except the invisible top border only changes the position of
// the legend element, so we have to adjust the position of the legend using a negative top margin.
@if $include-ie {
.#{$prefix}strict .#{$prefix}ie8 .#{$prefix}fieldset-header {
margin-bottom: -#{top($fieldset-border-width)};
.#{$prefix}tool,
.#{$prefix}fieldset-header-text,
.#{$prefix}fieldset-header-checkbox {
position: relative;
top: -#{top($fieldset-border-width)};
}
}
}
@if $include-ie {
.#{$prefix}quirks .#{$prefix}ie,
.#{$prefix}ie8m {
.#{$prefix}fieldset-header {
padding-left: #{left($fieldset-header-padding) - 2};
padding-right: #{right($fieldset-header-padding) - 2};
}
}
}
.#{$prefix}fieldset-collapsed {
.#{$prefix}fieldset-body {
display: none;
}
}
.#{$prefix}fieldset-collapsed {
padding-bottom: 0 !important;
border-width: 1px 1px 0 1px !important;
border-left-color: transparent !important;
border-right-color: transparent !important;
}
@if $include-ie {
.#{$prefix}ie6 .#{$prefix}fieldset-collapsed {
border-width: 1px 0 0 0 !important;
padding-bottom: 0 !important;
margin-left: 1px;
margin-right: 1px;
}
.#{$prefix}ie .#{$prefix}fieldset-bwrap {
zoom: 1;
}
}
@if $include-ie {
/* IE legend positioning bug */
.#{$prefix}ie .#{$prefix}fieldset-noborder legend {
position: relative;
margin-bottom: 23px;
}
.#{$prefix}ie .#{$prefix}fieldset-noborder legend span {
position: absolute;
left: 16px;
}
}
.#{$prefix}fieldset {
overflow: hidden;
}
.#{$prefix}fieldset-bwrap {
overflow: hidden;
zoom: 1;
}
.#{$prefix}fieldset-body {
overflow: hidden;
}
}</pre>
</body>
</html>