]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use box-sizing: border-box for all paintables (#8313)
authorLeif Åstrand <leif@vaadin.com>
Thu, 9 Feb 2012 18:13:40 +0000 (20:13 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 9 Feb 2012 18:13:40 +0000 (20:13 +0200)
WebContent/VAADIN/themes/base/paintable/paintable.css [new file with mode: 0644]
src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java
src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java

diff --git a/WebContent/VAADIN/themes/base/paintable/paintable.css b/WebContent/VAADIN/themes/base/paintable/paintable.css
new file mode 100644 (file)
index 0000000..1de0b70
--- /dev/null
@@ -0,0 +1,4 @@
+.v-paintable {
+       box-sizing: border-box;
+       -moz-box-sizing: border-box;
+}
\ No newline at end of file
index dcb95103d50810485d569148a2d527dd15954ce8..e02e3f4a44a0b6f7004cb05eafa9dce5eee91a29 100644 (file)
@@ -318,6 +318,7 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
 
         StringBuffer styleBuf = new StringBuffer();
         styleBuf.append(primaryStyleName);
+        styleBuf.append(" v-paintable");
 
         // first disabling and read-only status
         if (!enabled) {
index 9cb2a3aa63610e450a50c88a48d086bf59401b34..8581fade8d87b6c9b565c9d6069a55f43ab66f81 100644 (file)
@@ -24,11 +24,6 @@ public abstract class VLayoutSlot {
         this.widget = widget;
 
         wrapper.getStyle().setPosition(Position.ABSOLUTE);
-
-        // TODO set box sizing in CSS
-        Style widgetStyle = widget.getElement().getStyle();
-        widgetStyle.setProperty("MozBoxSizing", "border-box");
-        widgetStyle.setProperty("boxSizing", "border-box");
     }
 
     public VCaption getCaption() {