kempo-css 2.0.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test.yml +25 -25
- package/AGENTS.md +43 -43
- package/CHANGELOG.md +117 -107
- package/CONTRIBUTING.md +17 -0
- package/LICENSE.md +21 -21
- package/README.md +2 -48
- package/dist/kempo.min.css +1 -1
- package/docs/demo.inc.html +213 -213
- package/docs/index.html +171 -160
- package/docs/kempo-hljs.css +124 -124
- package/docs/kempo.css +1194 -1210
- package/docs/kempo.min.css +1 -1
- package/docs/manifest.json +87 -87
- package/docs/nav.js +32 -32
- package/docs/theme-editor.html +19 -64
- package/llms.txt +205 -0
- package/package.json +1 -1
- package/scripts/build.js +173 -173
- package/src/kempo-hljs.css +124 -124
- package/src/kempo.css +1194 -1210
- package/tests/base_reset.browser-test.js +201 -201
- package/tests/buttons.browser-test.js +223 -223
- package/tests/colors.browser-test.js +277 -277
- package/tests/components.browser-test.js +131 -131
- package/tests/css_variables.browser-test.js +170 -170
- package/tests/display_flex.browser-test.js +159 -159
- package/tests/elevation.browser-test.js +239 -239
- package/tests/forms.browser-test.js +224 -224
- package/tests/rows_columns.browser-test.js +171 -171
- package/tests/spacing.browser-test.js +310 -310
- package/tests/tables.browser-test.js +192 -192
- package/tests/typography.browser-test.js +255 -255
|
@@ -1,224 +1,224 @@
|
|
|
1
|
-
const getStyle = (el, prop) => getComputedStyle(el)[prop];
|
|
2
|
-
|
|
3
|
-
export const beforeAll = async () => {
|
|
4
|
-
const link = document.createElement('link');
|
|
5
|
-
link.rel = 'stylesheet';
|
|
6
|
-
link.href = '/src/kempo.css';
|
|
7
|
-
document.head.appendChild(link);
|
|
8
|
-
await new Promise(resolve => link.onload = resolve);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
'should style text input as block': ({pass, fail}) => {
|
|
13
|
-
const input = document.createElement('input');
|
|
14
|
-
input.type = 'text';
|
|
15
|
-
document.body.appendChild(input);
|
|
16
|
-
const display = getStyle(input, 'display');
|
|
17
|
-
const width = getStyle(input, 'width');
|
|
18
|
-
input.remove();
|
|
19
|
-
if(display === 'block'){
|
|
20
|
-
pass('Text input displays as block');
|
|
21
|
-
} else {
|
|
22
|
-
fail(`Expected block, got ${display}`);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
'should apply background to text input': ({pass, fail}) => {
|
|
27
|
-
const input = document.createElement('input');
|
|
28
|
-
input.type = 'text';
|
|
29
|
-
document.body.appendChild(input);
|
|
30
|
-
const bg = getStyle(input, 'backgroundColor');
|
|
31
|
-
input.remove();
|
|
32
|
-
if(bg && bg !== 'rgba(0, 0, 0, 0)'){
|
|
33
|
-
pass(`Text input has background: ${bg}`);
|
|
34
|
-
} else {
|
|
35
|
-
fail('Text input should have background');
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
'should apply border to text input': ({pass, fail}) => {
|
|
40
|
-
const input = document.createElement('input');
|
|
41
|
-
input.type = 'text';
|
|
42
|
-
document.body.appendChild(input);
|
|
43
|
-
const border = parseFloat(getStyle(input, 'borderWidth'));
|
|
44
|
-
input.remove();
|
|
45
|
-
if(border > 0){
|
|
46
|
-
pass(`Text input has border: ${border}px`);
|
|
47
|
-
} else {
|
|
48
|
-
fail('Text input should have border');
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
'should apply border radius to text input': ({pass, fail}) => {
|
|
53
|
-
const input = document.createElement('input');
|
|
54
|
-
input.type = 'text';
|
|
55
|
-
document.body.appendChild(input);
|
|
56
|
-
const radius = parseFloat(getStyle(input, 'borderRadius'));
|
|
57
|
-
input.remove();
|
|
58
|
-
if(radius > 0){
|
|
59
|
-
pass(`Text input has border radius: ${radius}px`);
|
|
60
|
-
} else {
|
|
61
|
-
fail('Text input should have border radius');
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
'should style select as block': ({pass, fail}) => {
|
|
66
|
-
const select = document.createElement('select');
|
|
67
|
-
document.body.appendChild(select);
|
|
68
|
-
const display = getStyle(select, 'display');
|
|
69
|
-
const cursor = getStyle(select, 'cursor');
|
|
70
|
-
select.remove();
|
|
71
|
-
if(display === 'block' && cursor === 'pointer'){
|
|
72
|
-
pass('Select displays as block with pointer cursor');
|
|
73
|
-
} else {
|
|
74
|
-
fail(`Expected block/pointer, got ${display}/${cursor}`);
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
'should style textarea as block with resize': ({pass, fail}) => {
|
|
79
|
-
const textarea = document.createElement('textarea');
|
|
80
|
-
document.body.appendChild(textarea);
|
|
81
|
-
const display = getStyle(textarea, 'display');
|
|
82
|
-
const resize = getStyle(textarea, 'resize');
|
|
83
|
-
textarea.remove();
|
|
84
|
-
if(display === 'block' && resize === 'vertical'){
|
|
85
|
-
pass('Textarea displays as block with vertical resize');
|
|
86
|
-
} else {
|
|
87
|
-
fail(`Expected block/vertical, got ${display}/${resize}`);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
'should style label as block with pointer cursor': ({pass, fail}) => {
|
|
92
|
-
const label = document.createElement('label');
|
|
93
|
-
document.body.appendChild(label);
|
|
94
|
-
const display = getStyle(label, 'display');
|
|
95
|
-
const cursor = getStyle(label, 'cursor');
|
|
96
|
-
label.remove();
|
|
97
|
-
if(display === 'block' && cursor === 'pointer'){
|
|
98
|
-
pass('Label displays as block with pointer cursor');
|
|
99
|
-
} else {
|
|
100
|
-
fail(`Expected block/pointer, got ${display}/${cursor}`);
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
'should style checkbox input': ({pass, fail}) => {
|
|
105
|
-
const input = document.createElement('input');
|
|
106
|
-
input.type = 'checkbox';
|
|
107
|
-
document.body.appendChild(input);
|
|
108
|
-
const display = getStyle(input, 'display');
|
|
109
|
-
const cursor = getStyle(input, 'cursor');
|
|
110
|
-
input.remove();
|
|
111
|
-
if(display === 'inline-block' && cursor === 'pointer'){
|
|
112
|
-
pass('Checkbox is inline-block with pointer cursor');
|
|
113
|
-
} else {
|
|
114
|
-
fail(`Expected inline-block/pointer, got ${display}/${cursor}`);
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
'should style radio input': ({pass, fail}) => {
|
|
119
|
-
const input = document.createElement('input');
|
|
120
|
-
input.type = 'radio';
|
|
121
|
-
document.body.appendChild(input);
|
|
122
|
-
const display = getStyle(input, 'display');
|
|
123
|
-
const cursor = getStyle(input, 'cursor');
|
|
124
|
-
input.remove();
|
|
125
|
-
if(display === 'inline-block' && cursor === 'pointer'){
|
|
126
|
-
pass('Radio is inline-block with pointer cursor');
|
|
127
|
-
} else {
|
|
128
|
-
fail(`Expected inline-block/pointer, got ${display}/${cursor}`);
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
'should reduce opacity on disabled input': ({pass, fail}) => {
|
|
133
|
-
const input = document.createElement('input');
|
|
134
|
-
input.type = 'text';
|
|
135
|
-
input.disabled = true;
|
|
136
|
-
document.body.appendChild(input);
|
|
137
|
-
const opacity = parseFloat(getStyle(input, 'opacity'));
|
|
138
|
-
input.remove();
|
|
139
|
-
if(opacity < 1){
|
|
140
|
-
pass(`Disabled input has reduced opacity: ${opacity}`);
|
|
141
|
-
} else {
|
|
142
|
-
fail(`Expected opacity < 1, got ${opacity}`);
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
'should reduce opacity on disabled select': ({pass, fail}) => {
|
|
147
|
-
const select = document.createElement('select');
|
|
148
|
-
select.disabled = true;
|
|
149
|
-
document.body.appendChild(select);
|
|
150
|
-
const opacity = parseFloat(getStyle(select, 'opacity'));
|
|
151
|
-
select.remove();
|
|
152
|
-
if(opacity < 1){
|
|
153
|
-
pass(`Disabled select has reduced opacity: ${opacity}`);
|
|
154
|
-
} else {
|
|
155
|
-
fail(`Expected opacity < 1, got ${opacity}`);
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
'should reduce opacity on disabled textarea': ({pass, fail}) => {
|
|
160
|
-
const textarea = document.createElement('textarea');
|
|
161
|
-
textarea.disabled = true;
|
|
162
|
-
document.body.appendChild(textarea);
|
|
163
|
-
const opacity = parseFloat(getStyle(textarea, 'opacity'));
|
|
164
|
-
textarea.remove();
|
|
165
|
-
if(opacity < 1){
|
|
166
|
-
pass(`Disabled textarea has reduced opacity: ${opacity}`);
|
|
167
|
-
} else {
|
|
168
|
-
fail(`Expected opacity < 1, got ${opacity}`);
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
'should style color input': ({pass, fail}) => {
|
|
173
|
-
const input = document.createElement('input');
|
|
174
|
-
input.type = 'color';
|
|
175
|
-
document.body.appendChild(input);
|
|
176
|
-
const height = parseFloat(getStyle(input, 'height'));
|
|
177
|
-
input.remove();
|
|
178
|
-
if(height > 0){
|
|
179
|
-
pass(`Color input has height: ${height}px`);
|
|
180
|
-
} else {
|
|
181
|
-
fail('Color input should have height');
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
'should style select[multiple]': ({pass, fail}) => {
|
|
186
|
-
const select = document.createElement('select');
|
|
187
|
-
select.multiple = true;
|
|
188
|
-
document.body.appendChild(select);
|
|
189
|
-
const height = parseFloat(getStyle(select, 'height'));
|
|
190
|
-
const resize = getStyle(select, 'resize');
|
|
191
|
-
select.remove();
|
|
192
|
-
if(height > 50 && resize === 'vertical'){
|
|
193
|
-
pass(`select[multiple] has height ${height}px and vertical resize`);
|
|
194
|
-
} else {
|
|
195
|
-
fail(`Expected height > 50 and vertical resize, got ${height}px/${resize}`);
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
'should style label.checkbox as inline-block': ({pass, fail}) => {
|
|
200
|
-
const label = document.createElement('label');
|
|
201
|
-
label.className = 'checkbox';
|
|
202
|
-
document.body.appendChild(label);
|
|
203
|
-
const display = getStyle(label, 'display');
|
|
204
|
-
label.remove();
|
|
205
|
-
if(display === 'inline-block'){
|
|
206
|
-
pass('label.checkbox displays as inline-block');
|
|
207
|
-
} else {
|
|
208
|
-
fail(`Expected inline-block, got ${display}`);
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
'should style label.radio as inline-block': ({pass, fail}) => {
|
|
213
|
-
const label = document.createElement('label');
|
|
214
|
-
label.className = 'radio';
|
|
215
|
-
document.body.appendChild(label);
|
|
216
|
-
const display = getStyle(label, 'display');
|
|
217
|
-
label.remove();
|
|
218
|
-
if(display === 'inline-block'){
|
|
219
|
-
pass('label.radio displays as inline-block');
|
|
220
|
-
} else {
|
|
221
|
-
fail(`Expected inline-block, got ${display}`);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
};
|
|
1
|
+
const getStyle = (el, prop) => getComputedStyle(el)[prop];
|
|
2
|
+
|
|
3
|
+
export const beforeAll = async () => {
|
|
4
|
+
const link = document.createElement('link');
|
|
5
|
+
link.rel = 'stylesheet';
|
|
6
|
+
link.href = '/src/kempo.css';
|
|
7
|
+
document.head.appendChild(link);
|
|
8
|
+
await new Promise(resolve => link.onload = resolve);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
'should style text input as block': ({pass, fail}) => {
|
|
13
|
+
const input = document.createElement('input');
|
|
14
|
+
input.type = 'text';
|
|
15
|
+
document.body.appendChild(input);
|
|
16
|
+
const display = getStyle(input, 'display');
|
|
17
|
+
const width = getStyle(input, 'width');
|
|
18
|
+
input.remove();
|
|
19
|
+
if(display === 'block'){
|
|
20
|
+
pass('Text input displays as block');
|
|
21
|
+
} else {
|
|
22
|
+
fail(`Expected block, got ${display}`);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
'should apply background to text input': ({pass, fail}) => {
|
|
27
|
+
const input = document.createElement('input');
|
|
28
|
+
input.type = 'text';
|
|
29
|
+
document.body.appendChild(input);
|
|
30
|
+
const bg = getStyle(input, 'backgroundColor');
|
|
31
|
+
input.remove();
|
|
32
|
+
if(bg && bg !== 'rgba(0, 0, 0, 0)'){
|
|
33
|
+
pass(`Text input has background: ${bg}`);
|
|
34
|
+
} else {
|
|
35
|
+
fail('Text input should have background');
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
'should apply border to text input': ({pass, fail}) => {
|
|
40
|
+
const input = document.createElement('input');
|
|
41
|
+
input.type = 'text';
|
|
42
|
+
document.body.appendChild(input);
|
|
43
|
+
const border = parseFloat(getStyle(input, 'borderWidth'));
|
|
44
|
+
input.remove();
|
|
45
|
+
if(border > 0){
|
|
46
|
+
pass(`Text input has border: ${border}px`);
|
|
47
|
+
} else {
|
|
48
|
+
fail('Text input should have border');
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
'should apply border radius to text input': ({pass, fail}) => {
|
|
53
|
+
const input = document.createElement('input');
|
|
54
|
+
input.type = 'text';
|
|
55
|
+
document.body.appendChild(input);
|
|
56
|
+
const radius = parseFloat(getStyle(input, 'borderRadius'));
|
|
57
|
+
input.remove();
|
|
58
|
+
if(radius > 0){
|
|
59
|
+
pass(`Text input has border radius: ${radius}px`);
|
|
60
|
+
} else {
|
|
61
|
+
fail('Text input should have border radius');
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
'should style select as block': ({pass, fail}) => {
|
|
66
|
+
const select = document.createElement('select');
|
|
67
|
+
document.body.appendChild(select);
|
|
68
|
+
const display = getStyle(select, 'display');
|
|
69
|
+
const cursor = getStyle(select, 'cursor');
|
|
70
|
+
select.remove();
|
|
71
|
+
if(display === 'block' && cursor === 'pointer'){
|
|
72
|
+
pass('Select displays as block with pointer cursor');
|
|
73
|
+
} else {
|
|
74
|
+
fail(`Expected block/pointer, got ${display}/${cursor}`);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
'should style textarea as block with resize': ({pass, fail}) => {
|
|
79
|
+
const textarea = document.createElement('textarea');
|
|
80
|
+
document.body.appendChild(textarea);
|
|
81
|
+
const display = getStyle(textarea, 'display');
|
|
82
|
+
const resize = getStyle(textarea, 'resize');
|
|
83
|
+
textarea.remove();
|
|
84
|
+
if(display === 'block' && resize === 'vertical'){
|
|
85
|
+
pass('Textarea displays as block with vertical resize');
|
|
86
|
+
} else {
|
|
87
|
+
fail(`Expected block/vertical, got ${display}/${resize}`);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
'should style label as block with pointer cursor': ({pass, fail}) => {
|
|
92
|
+
const label = document.createElement('label');
|
|
93
|
+
document.body.appendChild(label);
|
|
94
|
+
const display = getStyle(label, 'display');
|
|
95
|
+
const cursor = getStyle(label, 'cursor');
|
|
96
|
+
label.remove();
|
|
97
|
+
if(display === 'block' && cursor === 'pointer'){
|
|
98
|
+
pass('Label displays as block with pointer cursor');
|
|
99
|
+
} else {
|
|
100
|
+
fail(`Expected block/pointer, got ${display}/${cursor}`);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
'should style checkbox input': ({pass, fail}) => {
|
|
105
|
+
const input = document.createElement('input');
|
|
106
|
+
input.type = 'checkbox';
|
|
107
|
+
document.body.appendChild(input);
|
|
108
|
+
const display = getStyle(input, 'display');
|
|
109
|
+
const cursor = getStyle(input, 'cursor');
|
|
110
|
+
input.remove();
|
|
111
|
+
if(display === 'inline-block' && cursor === 'pointer'){
|
|
112
|
+
pass('Checkbox is inline-block with pointer cursor');
|
|
113
|
+
} else {
|
|
114
|
+
fail(`Expected inline-block/pointer, got ${display}/${cursor}`);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
'should style radio input': ({pass, fail}) => {
|
|
119
|
+
const input = document.createElement('input');
|
|
120
|
+
input.type = 'radio';
|
|
121
|
+
document.body.appendChild(input);
|
|
122
|
+
const display = getStyle(input, 'display');
|
|
123
|
+
const cursor = getStyle(input, 'cursor');
|
|
124
|
+
input.remove();
|
|
125
|
+
if(display === 'inline-block' && cursor === 'pointer'){
|
|
126
|
+
pass('Radio is inline-block with pointer cursor');
|
|
127
|
+
} else {
|
|
128
|
+
fail(`Expected inline-block/pointer, got ${display}/${cursor}`);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
'should reduce opacity on disabled input': ({pass, fail}) => {
|
|
133
|
+
const input = document.createElement('input');
|
|
134
|
+
input.type = 'text';
|
|
135
|
+
input.disabled = true;
|
|
136
|
+
document.body.appendChild(input);
|
|
137
|
+
const opacity = parseFloat(getStyle(input, 'opacity'));
|
|
138
|
+
input.remove();
|
|
139
|
+
if(opacity < 1){
|
|
140
|
+
pass(`Disabled input has reduced opacity: ${opacity}`);
|
|
141
|
+
} else {
|
|
142
|
+
fail(`Expected opacity < 1, got ${opacity}`);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
'should reduce opacity on disabled select': ({pass, fail}) => {
|
|
147
|
+
const select = document.createElement('select');
|
|
148
|
+
select.disabled = true;
|
|
149
|
+
document.body.appendChild(select);
|
|
150
|
+
const opacity = parseFloat(getStyle(select, 'opacity'));
|
|
151
|
+
select.remove();
|
|
152
|
+
if(opacity < 1){
|
|
153
|
+
pass(`Disabled select has reduced opacity: ${opacity}`);
|
|
154
|
+
} else {
|
|
155
|
+
fail(`Expected opacity < 1, got ${opacity}`);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
'should reduce opacity on disabled textarea': ({pass, fail}) => {
|
|
160
|
+
const textarea = document.createElement('textarea');
|
|
161
|
+
textarea.disabled = true;
|
|
162
|
+
document.body.appendChild(textarea);
|
|
163
|
+
const opacity = parseFloat(getStyle(textarea, 'opacity'));
|
|
164
|
+
textarea.remove();
|
|
165
|
+
if(opacity < 1){
|
|
166
|
+
pass(`Disabled textarea has reduced opacity: ${opacity}`);
|
|
167
|
+
} else {
|
|
168
|
+
fail(`Expected opacity < 1, got ${opacity}`);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
'should style color input': ({pass, fail}) => {
|
|
173
|
+
const input = document.createElement('input');
|
|
174
|
+
input.type = 'color';
|
|
175
|
+
document.body.appendChild(input);
|
|
176
|
+
const height = parseFloat(getStyle(input, 'height'));
|
|
177
|
+
input.remove();
|
|
178
|
+
if(height > 0){
|
|
179
|
+
pass(`Color input has height: ${height}px`);
|
|
180
|
+
} else {
|
|
181
|
+
fail('Color input should have height');
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
'should style select[multiple]': ({pass, fail}) => {
|
|
186
|
+
const select = document.createElement('select');
|
|
187
|
+
select.multiple = true;
|
|
188
|
+
document.body.appendChild(select);
|
|
189
|
+
const height = parseFloat(getStyle(select, 'height'));
|
|
190
|
+
const resize = getStyle(select, 'resize');
|
|
191
|
+
select.remove();
|
|
192
|
+
if(height > 50 && resize === 'vertical'){
|
|
193
|
+
pass(`select[multiple] has height ${height}px and vertical resize`);
|
|
194
|
+
} else {
|
|
195
|
+
fail(`Expected height > 50 and vertical resize, got ${height}px/${resize}`);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
'should style label.checkbox as inline-block': ({pass, fail}) => {
|
|
200
|
+
const label = document.createElement('label');
|
|
201
|
+
label.className = 'checkbox';
|
|
202
|
+
document.body.appendChild(label);
|
|
203
|
+
const display = getStyle(label, 'display');
|
|
204
|
+
label.remove();
|
|
205
|
+
if(display === 'inline-block'){
|
|
206
|
+
pass('label.checkbox displays as inline-block');
|
|
207
|
+
} else {
|
|
208
|
+
fail(`Expected inline-block, got ${display}`);
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
'should style label.radio as inline-block': ({pass, fail}) => {
|
|
213
|
+
const label = document.createElement('label');
|
|
214
|
+
label.className = 'radio';
|
|
215
|
+
document.body.appendChild(label);
|
|
216
|
+
const display = getStyle(label, 'display');
|
|
217
|
+
label.remove();
|
|
218
|
+
if(display === 'inline-block'){
|
|
219
|
+
pass('label.radio displays as inline-block');
|
|
220
|
+
} else {
|
|
221
|
+
fail(`Expected inline-block, got ${display}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|