Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

Allowing disableCSSAnimation option to disable pseudo elements animation #79

Merged
merged 2 commits into from
Mar 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/clientSideScripts/__snapshots__/setCustomCss.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`setCustomCss should be able to set the custom css with the animations d

exports[`setCustomCss should be able to set the custom css with the animations disabled 2`] = `
"body{padding-top:6px !important}body{padding-bottom:6px !important}
* {
*, *::before, *::after {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
Expand All @@ -24,7 +24,7 @@ exports[`setCustomCss should be able to set the custom css with the default opti

exports[`setCustomCss should be able to set the custom css with the with padding set to 0 1`] = `
"body{padding-top:6px !important}body{padding-bottom:6px !important}
* {
*, *::before, *::after {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
Expand All @@ -40,7 +40,7 @@ exports[`setCustomCss should be able to set the custom css with the with padding

exports[`setCustomCss should be able to set the custom css with the with padding set to 0 2`] = `
"body{padding-top:6px !important}body{padding-bottom:6px !important}
* {
*, *::before, *::after {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
Expand All @@ -52,7 +52,7 @@ exports[`setCustomCss should be able to set the custom css with the with padding
-ms-animation: none !important;
animation: none !important;
}body{padding-top:6px !important}body{padding-bottom:6px !important}
* {
*, *::before, *::after {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
Expand Down
4 changes: 2 additions & 2 deletions lib/clientSideScripts/setCustomCss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export default function setCustomCss(cssOptions: CssOptions): void {
if (document.head == null) {
return;
}

// disabling CSS animations for everything including pseudo elements
const disableTransformationsTransitionsAnimations = `
* {
*, *::before, *::after {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
Expand Down