@@ -24,10 +24,6 @@ ui5-checkbox {
24
24
max-width : 100% ;
25
25
}
26
26
27
- ui5- checkbox[wrap ] {
28
- height : auto ;
29
- }
30
-
31
27
.sapMCb {
32
28
display : flex ;
33
29
align-items : center ;
@@ -44,6 +40,10 @@ ui5-checkbox[wrap] {
44
40
pointer-events : none ;
45
41
}
46
42
43
+ & :focus {
44
+ outline : none ;
45
+ }
46
+
47
47
/*
48
48
* this is a hack for a bug in IE
49
49
* https://github.com/philipwalton/flexbugs/issues/231
@@ -65,6 +65,7 @@ ui5-checkbox[wrap] {
65
65
min-height : 1.125rem ;
66
66
min-width : 1.125rem ;
67
67
text-align : center ;
68
+ pointer-events : none ;
68
69
69
70
& .sapMCbMarkChecked :before {
70
71
content : " \e05b " ;
@@ -77,6 +78,7 @@ ui5-checkbox[wrap] {
77
78
& > input {
78
79
-webkit-appearance : none ;
79
80
visibility : hidden ;
81
+ width : 0 ;
80
82
}
81
83
82
84
& .sapMCbMark ,
@@ -89,9 +91,11 @@ ui5-checkbox[wrap] {
89
91
.sapMCb.sapMCbHasLabel {
90
92
padding-right : 0 ;
91
93
92
- ui5 - label {
94
+ & .sapWCLabelInCheckBox {
93
95
padding-left : 0.875rem ;
94
96
vertical-align : bottom ;
97
+ cursor : default ;
98
+ pointer-events : none ;
95
99
}
96
100
}
97
101
@@ -103,8 +107,11 @@ ui5-checkbox[wrap] {
103
107
top : 0.875rem ;
104
108
}
105
109
106
- ui5 - label {
110
+ .sapWCLabelInCheckBox {
107
111
line-height : 3rem ;
112
+ overflow : hidden ;
113
+ align-self : center ;
114
+ margin : 0.675rem 0 ;
108
115
}
109
116
}
110
117
@@ -149,10 +156,6 @@ ui5-checkbox[wrap] {
149
156
}
150
157
151
158
/* CheckBox focus */
152
- .sapMCb :focus {
153
- outline : none ;
154
- }
155
-
156
159
.sapMCbBg :focus ,
157
160
.sapMCbBg :active ,
158
161
.sap-desktop .sapMCbBg.sapMCbBgDis :focus {
@@ -201,16 +204,15 @@ ui5-checkbox[wrap] {
201
204
}
202
205
}
203
206
204
- /* ========================== Compact ========================== */
207
+ /* Compact */
205
208
.sapUiSizeCompact {
206
209
207
210
.sapMCb {
208
- height : 2rem ;
211
+ min- height : 2rem ;
209
212
min-height : 2rem ;
210
213
padding : 0 .5rem ;
211
214
}
212
215
213
-
214
216
.sapMCbBg {
215
217
left : 0.025rem ;
216
218
top : 0.025rem ;
@@ -224,7 +226,7 @@ ui5-checkbox[wrap] {
224
226
}
225
227
226
228
/* ChekBox With Label */
227
- .sapMCb.sapMCbHasLabel ui5 - label {
229
+ .sapMCb.sapMCbHasLabel .sapWCLabelInCheckBox {
228
230
padding-left : 0.5rem ;
229
231
vertical-align : bottom ;
230
232
}
@@ -234,103 +236,33 @@ ui5-checkbox[wrap] {
234
236
.sapMCbBg {
235
237
top : 0.5rem ;
236
238
}
237
- ui5- label {
239
+
240
+ .sapWCLabelInCheckBox {
238
241
line-height : 2rem ;
242
+ margin : .25rem 0 ;
239
243
}
240
244
}
241
245
242
246
.sapMCb :not (.sapMCbBgDis ).sapMCbHasLabel :focus :before {
243
- top : 0.375 rem ;
244
- bottom : 0.375 rem ;
247
+ top : 0.35 rem ;
248
+ bottom : 0.325 rem ;
245
249
left : .375rem ;
246
250
}
247
251
}
248
252
249
- [data- sap- ui- wc- root].sap-desktop.sapUiSizeCompact {
250
- .sapMCb :not (.sapMCbBgDis ).sapMCbHasLabel :focus :before {
251
- top :0.365rem ;
252
- bottom : 0.365rem ;
253
- left : 0.365rem ;
254
- }
255
- }
256
-
257
- /* ========================== RTL ========================== */
258
- :host (ui5- checkbox[dir= RTL ]) {
259
- .sapMCb.sapMCbHasLabel {
260
- padding-left : 0 ;
261
- padding-right : 0.875rem ;
262
-
263
- ui5- label {
264
- padding-right : 0.875rem ;
265
- padding-left : 0 ;
266
- }
267
- }
268
-
269
-
270
- .sapUiSizeCompact {
271
- .sapMCbBg {
272
- right : 0.025rem ;
273
- }
274
- /* ChekBox With Label */
275
- .sapMCb.sapMCbHasLabel ui5- label {
276
- padding-left : 0.5rem ;
277
- }
278
- }
279
- }
280
-
281
- ui5- checkbox[dir= RTL ] {
282
- .sapMCb.sapMCbHasLabel {
283
- padding-left : 0 ;
284
- padding-right : 0.875rem ;
285
-
286
- ui5- label {
287
- padding-right : 0.875rem ;
288
- padding-left : 0 ;
289
- }
290
- }
291
-
292
- .sapUiSizeCompact {
293
- .sapMCbBg {
294
- right : 0.025rem ;
295
- }
296
- /* ChekBox With Label */
297
- .sapMCb.sapMCbHasLabel ui5- label {
298
- padding-left : 0.5rem ;
299
- }
300
- }
301
- }
302
-
303
- span [dir= " rtl" ] {
304
-
253
+ /* RTL */
254
+ [dir= " rtl" ] {
305
255
& .sapMCb :not (.sapMCbBgDis ).sapMCbHasLabel :focus :before {
306
256
left : 0 ;
307
257
right : 0.675rem ;
308
258
}
309
259
310
- & .sapUiSizeCompact {
311
- & .sapMCb :not (.sapMCbBgDis ).sapMCbHasLabel :focus :before {
312
- top : .25rem ;
313
- bottom : .25rem ;
314
- }
315
- }
316
-
317
-
318
260
& .sapMCb.sapMCbHasLabel {
319
261
padding : 0 .875rem ;
320
262
padding-left : 0 ;
321
263
322
- & ui5 - label {
264
+ & .sapWCLabelInCheckBox {
323
265
padding : 0 .875rem 0 0 ;
324
266
}
325
267
}
326
- }
327
-
328
- .sapWCLabelInCheckBox {
329
- overflow : hidden ;
330
- align-self : center ;
331
- cursor : default ;
332
- }
333
-
334
- .sapMCbWrapped .sapWCLabelInCheckBox {
335
- margin : 0.675rem 0 ;
336
268
}
0 commit comments