left: 0;
@include radial-gradient(circle at 50% 50%, $v-window-modality-curtain-background-color, darken($v-window-modality-curtain-background-color, valo-gradient-opacity()), $fallback: $v-window-modality-curtain-background-color);
@include opacity(max(0.2, 0.8 - valo-gradient-opacity()/100%));
- @include valo-animate-in-fade($duration: 400ms, $delay: 100ms);
-
- .v-op12 & {
- // Opera 12 has a shitbreak with the fade-in (flickers)
- @include animation(none);
+ @if $v-animations-enabled {
+ @include valo-animate-in-fade($duration: 400ms, $delay: 100ms);
+ .v-op12 & {
+ // Opera 12 has a shitbreak with the fade-in (flickers)
+ @include animation(none);
+ }
}
}
--- /dev/null
+package com.vaadin.tests.themes.valo;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.tests.ModalWindow;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+public class ModalWindowTest extends SingleBrowserTest {
+
+ @Override
+ protected Class<?> getUIClass() {
+ return ModalWindow.class;
+ }
+
+ @Test
+ public void modalAnimationsAreDisabled() {
+ openTestURL("theme=tests-valo-disabled-animations");
+
+ openModalWindow();
+
+ WebElement modalityCurtain = findElement(By.className("v-window-modalitycurtain"));
+
+ assertThat(modalityCurtain.getCssValue("-webkit-animation-name"), is("none"));
+ }
+
+ private void openModalWindow() {
+ $(ButtonElement.class).get(1).click();
+ }
+}
\ No newline at end of file