diff --git a/.travis.yml b/.travis.yml
index 8d07a9c..9d91f69 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
sudo: false
dist: xenial
language: node_js
-node_js: 8.11
+node_js: 10.23
cache:
directories:
diff --git a/test/visual/no-padding.html b/test/visual/no-padding.html
new file mode 100644
index 0000000..aa93757
--- /dev/null
+++ b/test/visual/no-padding.html
@@ -0,0 +1,24 @@
+
+
+
+
+ Dialog tests
+
+
+
+
+
+
+
+
+ A very simple dialog with no padding
+
+
+
+
+
diff --git a/test/visual/screens/vaadin-dialog/lumo-no-padding.png b/test/visual/screens/vaadin-dialog/lumo-no-padding.png
new file mode 100644
index 0000000..24f5dfd
Binary files /dev/null and b/test/visual/screens/vaadin-dialog/lumo-no-padding.png differ
diff --git a/test/visual/screens/vaadin-dialog/material-no-padding.png b/test/visual/screens/vaadin-dialog/material-no-padding.png
new file mode 100644
index 0000000..e49c94c
Binary files /dev/null and b/test/visual/screens/vaadin-dialog/material-no-padding.png differ
diff --git a/test/visual/test.js b/test/visual/test.js
index 2d24403..96b2cee 100644
--- a/test/visual/test.js
+++ b/test/visual/test.js
@@ -14,6 +14,8 @@ gemini.suite('vaadin-dialog', function(rootSuite) {
.before(wait)
.after(goToAboutBlank);
+ const locator = 'body[data-ready]';
+
['lumo', 'material'].forEach(theme => {
gemini.suite(`default-tests-${theme}`, function(suite) {
suite
@@ -21,6 +23,13 @@ gemini.suite('vaadin-dialog', function(rootSuite) {
.setCaptureElements('body')
.capture('dialog');
});
+
+ it(`${theme}-no-padding`, function() {
+ return this.browser
+ .url(`no-padding.html?theme=${theme}`)
+ .waitForVisible(locator, 15000)
+ .assertView(`${theme}-no-padding`, locator);
+ });
});
});
diff --git a/theme/lumo/vaadin-dialog-styles.html b/theme/lumo/vaadin-dialog-styles.html
index b5d65ae..5b44f04 100644
--- a/theme/lumo/vaadin-dialog-styles.html
+++ b/theme/lumo/vaadin-dialog-styles.html
@@ -27,6 +27,11 @@
padding: var(--lumo-space-l);
}
+ /* No padding */
+ :host([theme~='no-padding']) [part='content'] {
+ padding: 0;
+ }
+
/* Animations */
:host([opening]),
diff --git a/theme/material/vaadin-dialog-styles.html b/theme/material/vaadin-dialog-styles.html
index 10b796f..7678f70 100644
--- a/theme/material/vaadin-dialog-styles.html
+++ b/theme/material/vaadin-dialog-styles.html
@@ -15,6 +15,11 @@
[part="content"] {
padding: 24px;
}
+
+ /* No padding */
+ :host([theme~='no-padding']) [part='content'] {
+ padding: 0;
+ }