Skip to content

Commit d20da88

Browse files
authored
fix(ui5-busyindicator): remove incorrect CSS transformation in IE (#816)
keyframes gets optimised by csso '100%' --> 'to' which doesn't match the runtime CSS transformation rules and incorrectly prepends the tag name, making the CSS invalid and braking on IE
1 parent 4f69de8 commit d20da88

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/base/src/util/CSSTransformUtils.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ const adaptLinePart = (line, tag) => {
5353
return replaceSelector(line, ":host", 0, tag);
5454
}
5555

56-
// IE specific selector (directly written with the tag) - keep it
57-
if (line.match(new RegExp(`^${tag}[^a-zA-Z0-9-]`))) {
56+
// Leave out @keyframes and keyframe values (0%, 100%, etc...)
57+
// csso shortens '100%' -> 'to', make sure to leave it untouched
58+
if (line.match(/^[@0-9]/) || line === "to" || line === "to{") {
5859
return line;
5960
}
6061

61-
// Leave out @keyframes and keyframe values (0%, 100%, etc...)
62-
if (line.match(/^[@0-9]/)) {
62+
// IE specific selector (directly written with the tag) - keep it
63+
if (line.match(new RegExp(`^${tag}[^a-zA-Z0-9-]`))) {
6364
return line;
6465
}
6566

0 commit comments

Comments
 (0)