Skip to content

Commit d5ca0d9

Browse files
authored
test: update dialog test styles to work with native popover (#9902)
1 parent b969279 commit d5ca0d9

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
2+
3+
registerStyles(
4+
'vaadin-dialog-overlay',
5+
css`
6+
:host {
7+
inset: 0;
8+
}
9+
10+
/* Disable optical centering */
11+
:host::after {
12+
flex-grow: 1;
13+
}
14+
15+
/* Disable content padding */
16+
[part='content'] {
17+
padding: 0;
18+
}
19+
`,
20+
);

packages/dialog/test/draggable-resizable.test.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,8 @@
11
import { expect } from '@vaadin/chai-plugins';
22
import { fixtureSync, nextFrame, nextRender, nextUpdate } from '@vaadin/testing-helpers';
33
import sinon from 'sinon';
4+
import './draggable-resizable-styles.js';
45
import '../src/vaadin-dialog.js';
5-
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6-
7-
const style = document.createElement('style');
8-
style.textContent = css`
9-
/* Disable safe area */
10-
vaadin-dialog-overlay {
11-
inset: 0;
12-
}
13-
14-
/* Disable optical centering */
15-
vaadin-dialog-overlay::after {
16-
flex-grow: 1;
17-
}
18-
19-
/* Disable content padding */
20-
vaadin-dialog-overlay::part(content) {
21-
padding: 0;
22-
}
23-
`;
24-
document.head.append(style);
256

267
customElements.define(
278
'internally-draggable',

0 commit comments

Comments
 (0)