Skip to content

Commit 89a5241

Browse files
authored
test: disable animation on label, helper, required indicator (#9121)
1 parent 8547bfa commit 89a5241

File tree

17 files changed

+223
-50
lines changed

17 files changed

+223
-50
lines changed

packages/checkbox-group/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
33
registerStyles(
44
'vaadin-checkbox-group',
55
css`
6-
/* Show error message immediately */
7-
[part='error-message'] {
8-
animation: none !important;
9-
transition: none !important;
6+
/* Disable animation */
7+
[part='label'],
8+
[part$='button'],
9+
[part='helper-text'],
10+
[part='input-field'],
11+
[part='error-message'],
12+
[part='required-indicator'],
13+
::slotted(:is(input, textarea):placeholder-shown) {
14+
&,
15+
&::before,
16+
&::after {
17+
animation: none !important;
18+
transition: none !important;
19+
}
1020
}
1121
`,
1222
);

packages/checkbox/test/visual/common.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
33
registerStyles(
44
'vaadin-checkbox',
55
css`
6-
/* Show error message immediately */
7-
[part='error-message'] {
8-
transition: none !important;
6+
/* Disable animation */
7+
[part='label'],
8+
[part$='button'],
9+
[part='helper-text'],
10+
[part='input-field'],
11+
[part='error-message'],
12+
[part='required-indicator'],
13+
::slotted(:is(input, textarea):placeholder-shown) {
14+
&,
15+
&::before,
16+
&::after {
17+
animation: none !important;
18+
transition: none !important;
19+
}
920
}
1021
`,
1122
);

packages/combo-box/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ registerStyles(
99
caret-color: transparent;
1010
}
1111
12-
/* Show error message immediately */
13-
[part='error-message'] {
14-
animation: none !important;
15-
transition: none !important;
12+
/* Disable animation */
13+
[part='label'],
14+
[part$='button'],
15+
[part='helper-text'],
16+
[part='input-field'],
17+
[part='error-message'],
18+
[part='required-indicator'],
19+
::slotted(:is(input, textarea):placeholder-shown) {
20+
&,
21+
&::before,
22+
&::after {
23+
animation: none !important;
24+
transition: none !important;
25+
}
1626
}
1727
`,
1828
);

packages/custom-field/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
33
registerStyles(
44
'vaadin-custom-field vaadin-date-picker vaadin-number-field vaadin-text-field',
55
css`
6-
/* Show error message immediately */
7-
[part='error-message'] {
8-
animation: none !important;
9-
transition: none !important;
6+
/* Disable animation */
7+
[part='label'],
8+
[part$='button'],
9+
[part='helper-text'],
10+
[part='input-field'],
11+
[part='error-message'],
12+
[part='required-indicator'],
13+
::slotted(:is(input, textarea):placeholder-shown) {
14+
&,
15+
&::before,
16+
&::after {
17+
animation: none !important;
18+
transition: none !important;
19+
}
1020
}
1121
`,
1222
);

packages/date-picker/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ registerStyles(
99
caret-color: transparent;
1010
}
1111
12-
/* Show error message immediately */
13-
[part='error-message'] {
14-
animation: none !important;
15-
transition: none !important;
12+
/* Disable animation */
13+
[part='label'],
14+
[part$='button'],
15+
[part='helper-text'],
16+
[part='input-field'],
17+
[part='error-message'],
18+
[part='required-indicator'],
19+
::slotted(:is(input, textarea):placeholder-shown) {
20+
&,
21+
&::before,
22+
&::after {
23+
animation: none !important;
24+
transition: none !important;
25+
}
1626
}
1727
`,
1828
);

packages/date-time-picker/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ registerStyles(
88
caret-color: transparent;
99
}
1010
11-
/* Show error message immediately */
12-
[part='error-message'] {
13-
animation: none !important;
14-
transition: none !important;
11+
/* Disable animation */
12+
[part='label'],
13+
[part$='button'],
14+
[part='helper-text'],
15+
[part='input-field'],
16+
[part='error-message'],
17+
[part='required-indicator'],
18+
::slotted(:is(input, textarea):placeholder-shown) {
19+
&,
20+
&::before,
21+
&::after {
22+
animation: none !important;
23+
transition: none !important;
24+
}
1525
}
1626
`,
1727
);

packages/login/test/visual/common.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,21 @@ registerStyles(
77
::slotted(input) {
88
caret-color: transparent;
99
}
10+
11+
/* Disable animation */
12+
[part='label'],
13+
[part$='button'],
14+
[part='helper-text'],
15+
[part='input-field'],
16+
[part='error-message'],
17+
[part='required-indicator'],
18+
::slotted(:is(input, textarea):placeholder-shown) {
19+
&,
20+
&::before,
21+
&::after {
22+
animation: none !important;
23+
transition: none !important;
24+
}
25+
}
1026
`,
1127
);

packages/multi-select-combo-box/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ registerStyles(
99
caret-color: transparent !important;
1010
}
1111
12-
/* Show error message immediately */
13-
[part='error-message'] {
14-
animation: none !important;
15-
transition: none !important;
12+
/* Disable animation */
13+
[part='label'],
14+
[part$='button'],
15+
[part='helper-text'],
16+
[part='input-field'],
17+
[part='error-message'],
18+
[part='required-indicator'],
19+
::slotted(:is(input, textarea):placeholder-shown) {
20+
&,
21+
&::before,
22+
&::after {
23+
animation: none !important;
24+
transition: none !important;
25+
}
1626
}
1727
`,
1828
);

packages/number-field/test/visual/common.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ registerStyles(
88
caret-color: transparent;
99
}
1010
11-
/* Show error message immediately */
12-
[part='error-message'] {
13-
animation: none !important;
14-
transition: none !important;
11+
/* Disable animation */
12+
[part='label'],
13+
[part$='button'],
14+
[part='helper-text'],
15+
[part='input-field'],
16+
[part='error-message'],
17+
[part='required-indicator'],
18+
::slotted(:is(input, textarea):placeholder-shown) {
19+
&,
20+
&::before,
21+
&::after {
22+
animation: none !important;
23+
transition: none !important;
24+
}
1525
}
1626
`,
1727
);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
2+
3+
registerStyles(
4+
'vaadin-password-field',
5+
css`
6+
/* Hide caret */
7+
:host([focused]) ::slotted(input) {
8+
caret-color: transparent;
9+
}
10+
11+
/* Disable animation */
12+
[part='label'],
13+
[part$='button'],
14+
[part='helper-text'],
15+
[part='input-field'],
16+
[part='error-message'],
17+
[part='required-indicator'],
18+
::slotted(:is(input, textarea):placeholder-shown) {
19+
&,
20+
&::before,
21+
&::after {
22+
animation: none !important;
23+
transition: none !important;
24+
}
25+
}
26+
`,
27+
);

0 commit comments

Comments
 (0)