Skip to content

Commit 0c25454

Browse files
committed
feat: change positioning css to use css vars
1 parent cf53bb2 commit 0c25454

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/feedback/src/widget/Dialog.css.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ export function createDialogStyles(d: Document): HTMLStyleElement {
3232
3333
.dialog__content {
3434
position: fixed;
35-
right: 1rem;
36-
bottom: 1rem;
35+
left: var(--left);
36+
right: var(--right);
37+
bottom: var(--bottom);
38+
top: var(--top);
3739
3840
border: var(--border);
3941
padding: 24px;

packages/feedback/src/widget/Main.css.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ export function createMainStyles(d: Document, colorScheme: 'system' | 'dark' | '
88
const theme = colorScheme === 'system' ? themes.light : themes[colorScheme];
99
style.textContent = `
1010
:host {
11+
--bottom: 1rem;
12+
--right: 1rem;
13+
--top: auto;
14+
--left: auto;
15+
1116
position: fixed;
12-
right: 1rem;
13-
bottom: 1rem;
17+
left: var(--left);
18+
right: var(--right);
19+
bottom: var(--bottom);
20+
top: var(--top);
21+
1422
font-family: ${theme.fontFamily};
1523
font-size: ${theme.fontSize};
1624
--bg-color: ${theme.background};

0 commit comments

Comments
 (0)