From: Johannes Dahlström Date: Fri, 25 May 2012 12:35:28 +0000 (+0000) Subject: #7911 Added a common CSS class "v-touch" for all touch devices X-Git-Tag: 7.0.0.alpha3~135^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cac340e3dda0c4ec68af5294df84d428ffd5d30d;p=vaadin-framework.git #7911 Added a common CSS class "v-touch" for all touch devices svn changeset:23828/svn branch:6.8 --- diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java index c8caab6829..4b9f3eacab 100644 --- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java +++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java @@ -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;