]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7911 Added a common CSS class "v-touch" for all touch devices
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Fri, 25 May 2012 12:35:28 +0000 (12:35 +0000)
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Fri, 25 May 2012 12:35:28 +0000 (12:35 +0000)
svn changeset:23828/svn branch:6.8

src/com/vaadin/terminal/gwt/client/BrowserInfo.java

index c8caab6829905ba452715647bc4733fc375cf2d7..4b9f3eacab5228d935f784092bc24baa46aac6e2 100644 (file)
@@ -33,6 +33,9 @@ public class BrowserInfo {
     private static final String OS_ANDROID = "android";
     private static final String OS_IOS = "ios";
 
+    // Common CSS class for all touch devices
+    private static final String UI_TOUCH = "touch";
+
     private static BrowserInfo instance;
 
     private static String cssClass = null;
@@ -171,7 +174,9 @@ public class BrowserInfo {
             if (osClass != null) {
                 cssClass = cssClass + " " + prefix + osClass;
             }
-
+            if (isTouchDevice()) {
+                cssClass = cssClass + " " + prefix + UI_TOUCH;
+            }
         }
 
         return cssClass;