Skip to content

Commit 0af6c3d

Browse files
authored
fix(ui5-busyindicator): adjust stylings to latest spec (#1344)
- using scale with value more than 1 used to blur stylings on Webkit browsers BREAKING CHANGE: Medium size is now default FIXES: #1337
1 parent bfe4b19 commit 0af6c3d

File tree

3 files changed

+71
-38
lines changed

3 files changed

+71
-38
lines changed

packages/main/src/BusyIndicator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const metadata = {
3939
* @defaultvalue "Large"
4040
* @public
4141
*/
42-
size: { type: BusyIndicatorSize, defaultValue: BusyIndicatorSize.Large },
42+
size: { type: BusyIndicatorSize, defaultValue: BusyIndicatorSize.Medium },
4343

4444
/**
4545
* Defines if the busy indicator is visible on the screen. By default it is not.

packages/main/src/themes/BusyIndicator.css

+22-23
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,35 @@
1212
}
1313

1414
:host([size="Small"]) .ui5-busyindicator-root {
15-
min-width: 3rem;
16-
min-height: 1rem;
15+
min-width: 1.5em;
16+
min-height: .5rem;
1717
}
1818

1919
:host([size="Small"]) .ui5-busyindicator-circle {
20-
width: 0.125rem;
21-
height: 0.125rem;
22-
margin: 0 0.2rem;
20+
width: .5rem;
21+
height: .5rem;
2322
}
2423

24+
:host(:not([size])) .ui5-busyindicator-root,
2525
:host([size="Medium"]) .ui5-busyindicator-root {
26-
min-width: 5rem;
27-
min-height: 2rem;
26+
min-width: 3rem;
27+
min-height: 1rem;
2828
}
2929

30+
:host(:not([size])) .ui5-busyindicator-circle,
3031
:host([size="Medium"]) .ui5-busyindicator-circle {
31-
width: 0.5rem;
32-
height: 0.5rem;
33-
margin: 0 0.4rem;
32+
width: 1rem;
33+
height: 1rem;
3434
}
3535

3636
:host([size="Large"]) .ui5-busyindicator-root {
37-
min-width: 8rem;
38-
min-height: 3rem;
37+
min-width: 6rem;
38+
min-height: 2rem;
3939
}
4040

4141
:host([size="Large"]) .ui5-busyindicator-circle {
42-
width: 1rem;
43-
height: 1rem;
44-
margin: 0 .75rem;
42+
width: 2rem;
43+
height: 2rem;
4544
}
4645

4746
.ui5-busyindicator-root {
@@ -97,15 +96,15 @@
9796

9897
@keyframes grow {
9998
0%, 50%, 100% {
100-
-webkit-transform: scale(1.0);
101-
-moz-transform: scale(1.0);
102-
-ms-transform: scale(1.0);
103-
transform: scale(1.0);
99+
-webkit-transform: scale(0.5);
100+
-moz-transform: scale(0.5);
101+
-ms-transform: scale(0.5);
102+
transform: scale(0.5);
104103
}
105104
25% {
106-
-webkit-transform: scale(2.5);
107-
-moz-transform: scale(2.5);
108-
-ms-transform: scale(2.5);
109-
transform: scale(2.5);
105+
-webkit-transform: scale(1);
106+
-moz-transform: scale(1);
107+
-ms-transform: scale(1);
108+
transform: scale(1);
110109
}
111110
}

packages/main/test/pages/BusyIndicator.html

+48-14
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@
3131
<ui5-title>Medium ui5-busyindicator</ui5-title>
3232
<ui5-busyindicator size="Medium" active id="indicator1"></ui5-busyindicator>
3333

34-
<br/>
35-
<br/>
34+
<br />
35+
<br />
3636
<ui5-busyindicator size="Medium" active id="indicator2"></ui5-busyindicator>
3737

38-
<br/>
39-
<br/>
38+
<br />
39+
<br />
4040

4141
<ui5-busyindicator size="Medium" active>
4242
<ui5-button>Hello World</ui5-button>
4343
</ui5-busyindicator>
4444

45-
<br/>
46-
<br/>
45+
<br />
46+
<br />
4747
<ui5-busyindicator size="Medium" active>
4848
<ui5-checkbox text="Hello World"></ui5-checkbox>
4949
</ui5-busyindicator>
5050

51-
<br/>
52-
<br/>
51+
<br />
52+
<br />
5353

5454
<ui5-button id="fetch-btn" style="width: 120px;">Fetch List Data</ui5-button>
5555
<br>
@@ -65,12 +65,46 @@
6565
<br>
6666

6767
<ui5-busyindicator size="Medium" active style="width: 500px; margin-left: 100px">
68-
<ui5-list style="width: 100%; border: 1px solid black;">
69-
<ui5-li>Item 1</ui5-li>
70-
<ui5-li>Item 2</ui5-li>
71-
<ui5-li>Item 3</ui5-li>
72-
</ui5-list>
73-
</ui5-busyindicator>
68+
<ui5-list style="width: 100%; border: 1px solid black;">
69+
<ui5-li>Item 1</ui5-li>
70+
<ui5-li>Item 2</ui5-li>
71+
<ui5-li>Item 3</ui5-li>
72+
</ui5-list>
73+
</ui5-busyindicator>
74+
75+
<br>
76+
<br>
77+
<br>
78+
79+
<span>Medium (default) </span>
80+
<br>
81+
<br>
82+
83+
<ui5-busyindicator active></ui5-busyindicator>
84+
<br>
85+
<br>
86+
<span>Small </span>
87+
88+
<br>
89+
<br>
90+
<ui5-busyindicator size="Small" active></ui5-busyindicator>
91+
<br>
92+
<br>
93+
<span>Medium </span>
94+
95+
<br>
96+
<br>
97+
<ui5-busyindicator size="Medium" active></ui5-busyindicator>
98+
<br>
99+
<br>
100+
<span>Large </span>
101+
102+
<br>
103+
<br>
104+
<ui5-busyindicator size="Large" active></ui5-busyindicator>
105+
<br>
106+
<br>
107+
74108

75109
<script>
76110
const busyIndocator = document.getElementById("busy-container");

0 commit comments

Comments
 (0)