diff --git a/index.css b/index.css index a9f3544..55d2787 100644 --- a/index.css +++ b/index.css @@ -98,7 +98,11 @@ dialog:not([open]) { } dialog { position: absolute; - justify-self: dialog; + inset-inline-start: 0; + inset-inline-end: 0; + width: fit-content; + height: fit-content; + margin: auto; border: solid; padding: 1em; background-color: Canvas; @@ -106,8 +110,8 @@ dialog { } dialog:modal { position: fixed; - place-self: dialog; overflow: auto; + inset-block: 0; max-width: calc(100% - 6px - 2em); max-height: calc(100% - 6px - 2em); } @@ -125,7 +129,10 @@ dialog:popover-open { [popover] { position: fixed; - place-self: dialog; + inset: 0; + width: fit-content; + height: fit-content; + margin: auto; border: solid; padding: 0.25em; overflow: auto; diff --git a/index.js b/index.js index 3c3c881..b3c0ee6 100644 --- a/index.js +++ b/index.js @@ -200,8 +200,24 @@ export default [ value: 'absolute', }, { - property: 'justify-self', - value: 'dialog', + property: 'inset-inline-start', + value: '0', + }, + { + property: 'inset-inline-end', + value: '0', + }, + { + property: 'width', + value: 'fit-content', + }, + { + property: 'height', + value: 'fit-content', + }, + { + property: 'margin', + value: 'auto', }, { property: 'border', @@ -229,14 +245,14 @@ export default [ property: 'position', value: 'fixed', }, - { - property: 'place-self', - value: 'dialog', - }, { property: 'overflow', value: 'auto', }, + { + property: 'inset-block', + value: '0', + }, { property: 'max-width', value: 'calc(100% - 6px - 2em)', @@ -286,8 +302,20 @@ export default [ value: 'fixed', }, { - property: 'place-self', - value: 'dialog', + property: 'inset', + value: '0', + }, + { + property: 'width', + value: 'fit-content', + }, + { + property: 'height', + value: 'fit-content', + }, + { + property: 'margin', + value: 'auto', }, { property: 'border',