Use fit-content for height and width
This commit is contained in:
Родитель
b543d713b4
Коммит
3da8a62f45
|
@ -7,6 +7,14 @@ dialog {
|
|||
background: white;
|
||||
color: black;
|
||||
|
||||
width: -moz-fit-content;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
|
||||
height: -moz-fit-content;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,12 @@
|
|||
<head>
|
||||
<script src="../dialog-polyfill.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../dialog-polyfill.css">
|
||||
<style>
|
||||
dialog {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test that dialog is centered in the viewport. The test passes if you see a
|
||||
box in the center of the screen.</p>
|
||||
<div id="console"></div>
|
||||
<dialog></dialog>
|
||||
<dialog>Hello</dialog>
|
||||
<script>
|
||||
function writeToConsole(s) {
|
||||
var console = document.getElementById('console');
|
||||
|
|
Загрузка…
Ссылка в новой задаче