Skip to content

Commit 145dbf0

Browse files
authored
fix: modal css vars (#784)
* css vars for width, background and border radius * more border radius * remove max-width from dialog
1 parent d37c2c4 commit 145dbf0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

packages/uui-modal/lib/uui-modal-dialog.element.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,21 @@ export class UUIModalDialogElement extends UUIModalElement {
1515
static styles = [
1616
...UUIModalElement.styles,
1717
css`
18+
:host {
19+
--uui-modal-dialog-background: var(--uui-color-surface);
20+
}
1821
dialog {
1922
margin: auto;
2023
max-width: 100%;
2124
max-height: 100%;
22-
border-radius: 12px;
25+
border-radius: var(
26+
--uui-modal-dialog-border-radius,
27+
calc(var(--uui-border-radius) * 4)
28+
);
29+
background: var(
30+
--uui-modal-dialog-background,
31+
var(--uui-color-surface)
32+
);
2333
}
2434
:host([index='0']) dialog {
2535
box-shadow: var(--uui-shadow-depth-5);

packages/uui-modal/lib/uui-modal-sidebar.element.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class UUIModalSidebarElement extends UUIModalElement {
6868
css`
6969
:host {
7070
--uui-modal-sidebar-left-gap: 24px;
71+
--uui-modal-sidebar-background: var(--uui-color-surface);
7172
}
7273
@media (min-width: 600px) {
7374
:host {
@@ -82,6 +83,10 @@ export class UUIModalSidebarElement extends UUIModalElement {
8283
margin-left: auto;
8384
right: var(--uui-modal-offset);
8485
transition: right var(--uui-modal-transition-duration, 250ms);
86+
background: var(
87+
--uui-modal-sidebar-background,
88+
var(--uui-color-surface)
89+
);
8590
}
8691
:host([index='0']) dialog {
8792
box-shadow: var(--uui-shadow-depth-5);

0 commit comments

Comments
 (0)