fix(ui/overlays): set <dialog> wrapping el padding to 0
This commit is contained in:
parent
ecea06cb6e
commit
42a463eee1
4 changed files with 10 additions and 4 deletions
5
.changeset/eleven-walls-vanish.md
Normal file
5
.changeset/eleven-walls-vanish.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Set padding of <dialog> to 0 so it doesn't show a weird 1em width/height box due to user agent styles.
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -22518,7 +22518,7 @@
|
||||||
},
|
},
|
||||||
"packages/ajax": {
|
"packages/ajax": {
|
||||||
"name": "@lion/ajax",
|
"name": "@lion/ajax",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"packages/singleton-manager": {
|
"packages/singleton-manager": {
|
||||||
|
|
@ -22527,7 +22527,7 @@
|
||||||
},
|
},
|
||||||
"packages/ui": {
|
"packages/ui": {
|
||||||
"name": "@lion/ui",
|
"name": "@lion/ui",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bundled-es-modules/message-format": "^6.0.4",
|
"@bundled-es-modules/message-format": "^6.0.4",
|
||||||
|
|
|
||||||
|
|
@ -575,7 +575,8 @@ export class OverlayController extends EventTarget {
|
||||||
// N.B. position: fixed is needed to escape out of 'overflow: hidden'
|
// N.B. position: fixed is needed to escape out of 'overflow: hidden'
|
||||||
// We give a high z-index for non-modal dialogs, so that we at least win from all siblings of our
|
// We give a high z-index for non-modal dialogs, so that we at least win from all siblings of our
|
||||||
// parent stacking context
|
// parent stacking context
|
||||||
wrappingDialogElement.style.cssText = `display:none; z-index: ${this.config.zIndex};`;
|
// padding reset so we don't get a weird dialog visual square showing up
|
||||||
|
wrappingDialogElement.style.cssText = `display:none; z-index: ${this.config.zIndex}; padding: 0;`;
|
||||||
this.__wrappingDialogNode = wrappingDialogElement;
|
this.__wrappingDialogNode = wrappingDialogElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import { createShadowHost } from '../test-helpers/createShadowHost.js';
|
||||||
* @typedef {import('../types/OverlayConfig.js').ViewportPlacement} ViewportPlacement
|
* @typedef {import('../types/OverlayConfig.js').ViewportPlacement} ViewportPlacement
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const wrappingDialogNodeStyle = 'display: none; z-index: 9999;';
|
const wrappingDialogNodeStyle = 'display: none; z-index: 9999; padding: 0px;';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make sure that all browsers serialize html in a similar way
|
* Make sure that all browsers serialize html in a similar way
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue