using vaadin 7.4.2 touchkit 4.0.0 -
I am using a sample code from the vaadin book - all runs fine, but unable to do any styling
here is my code:
package com.example.mytoucht4;
import javax.servlet.annotation.WebServlet;
import com.vaadin.addon.touchkit.server.TouchKitServlet;
import com.vaadin.addon.touchkit.ui.NavigationView;
import com.vaadin.addon.touchkit.ui.NumberField;
import com.vaadin.addon.touchkit.ui.Switch;
import com.vaadin.addon.touchkit.ui.VerticalComponentGroup;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI;
@SuppressWarnings(“serial”)
@Theme(“touchkit”)
public class Mytoucht4UI extends UI {
@WebServlet(value = “/*”, asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = Mytoucht4UI.class
, widgetset = “com.example.mytoucht4.widgetset.Mytoucht4Widgetset”)
public static class Servlet extends TouchKitServlet { }
@Override
protected void init(VaadinRequest request) {
class MyView extends NavigationView {
public MyView() {
super("Planet Details");
CssLayout content = new CssLayout();
setContent(content);
VerticalComponentGroup group = new VerticalComponentGroup();
content.addComponent(group);
group.addComponent(new TextField("Planet"));
group.addComponent(new NumberField("Found"));
group.addComponent(new Switch("Probed"));
Button btn = new Button();
btn.setStyleName("btnsn");
btn.setCaption("OK");
setRightComponent( btn);
}
}
NavigationView myView = new MyView();
myView.setStyleName("myviewsn");
setContent( myView);
}
}
here are my edits to mytoucht4,scss
// Insert your own theme rules here
.mytoucht4 button here are my edits to mytoucht4.scss{ color:red !important;}
.mytoucht4 .btnsn { color:red !important;}
}
the above attempt to change the color does not work
can someone give some guidance on how to do css styling in a touchkit app?