mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 15:24:57 +00:00

Although we translate e.g `block` to `block flow` for internal use in the engine, CSS-DISPLAY-3 tells us to use the short form in serializations for compatibility reasons. This adds 9 points to our score on https://html5test.com/ :^)
32 lines
850 B
HTML
32 lines
850 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const e = document.createElement("div");
|
|
document.body.appendChild(e);
|
|
function checkDisplay(display) {
|
|
e.style.display = display;
|
|
const computedStyle = getComputedStyle(e);
|
|
const serialized = computedStyle.display;
|
|
println(display + " => " + serialized);
|
|
}
|
|
for (display of [
|
|
"none",
|
|
"block",
|
|
"flow-root",
|
|
"inline",
|
|
"inline-block",
|
|
"run-in",
|
|
"list-item",
|
|
"flex",
|
|
"inline-flex",
|
|
"grid",
|
|
"inline-grid",
|
|
"ruby",
|
|
"table",
|
|
"inline-table",
|
|
]) {
|
|
checkDisplay(display);
|
|
}
|
|
e.remove();
|
|
});
|
|
</script>
|