]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed regression by #15381 on IE8
authorTeppo Kurki <teppo.kurki@vaadin.com>
Mon, 22 Jun 2015 10:52:34 +0000 (13:52 +0300)
committerVaadin Code Review <review@vaadin.com>
Mon, 22 Jun 2015 12:40:27 +0000 (12:40 +0000)
The opacity for disabled menu items looks very ugly on IE8.
Fixed by using the previous gray color for text and opacity
filter only for the item icon.

Change-Id: If48716cdccef05ebdba43b5600e41c0690398429

WebContent/VAADIN/themes/base/menubar/menubar.scss
uitest/src/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java

index 5ffac6de098445744858ca01ed0ae7cb9850f9d8..ad701f1b4266cda5862438e7c78dbbb4618f29a0 100644 (file)
 .#{$primaryStyleName} span.#{$primaryStyleName}-menuitem-disabled:active {
        opacity: .5;
        filter: alpha(opacity=50);
+       
+       .v-ie8 & {
+               filter: none;
+               color: #999;
+               img {
+                       filter: alpha(opacity=50);
+               }
+       }
 }
+
 .#{$primaryStyleName}-more-menuitem {
        /* Arial has the most coverage for geometric entity characters */
        font-family: arial, helvetica, sans-serif;
index bec28d7929b87dfb4ed7c765b838d880ce9d9871..3a5ddf5f3bf40de050592c8af8b7c106b00ad777 100644 (file)
@@ -21,19 +21,17 @@ public class DisabledMenuBarItemTest extends MultiBrowserTest {
         WebElement element = driver.findElement(By
                 .className("v-menubar-menuitem-disabled"));
 
-        assertThat(element.getCssValue("opacity"), is("0.5"));
-
-        if (browserIsIE8or9()) {
+        if (Browser.IE9.getDesiredCapabilities().equals(
+                getDesiredCapabilities())) {
             assertThat(element.getCssValue("filter"), is("alpha(opacity=50)"));
+        } else if (Browser.IE8.getDesiredCapabilities().equals(
+                getDesiredCapabilities())) {
+            WebElement icon = element.findElement(By.tagName("img"));
+            assertThat(icon.getCssValue("filter"), is("alpha(opacity=50)"));
+        } else {
+            assertThat(element.getCssValue("opacity"), is("0.5"));
         }
 
         compareScreen("transparent");
     }
-
-    private boolean browserIsIE8or9() {
-        return Browser.IE8.getDesiredCapabilities().equals(
-                getDesiredCapabilities())
-                || Browser.IE9.getDesiredCapabilities().equals(
-                        getDesiredCapabilities());
-    }
 }
\ No newline at end of file