mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Base: Add developer's tests to computed-style.html
This commit is contained in:
parent
20fb900937
commit
dc026db800
1 changed files with 23 additions and 0 deletions
|
@ -13,6 +13,22 @@
|
||||||
display: block;
|
display: block;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
p {
|
||||||
|
display: inherit;
|
||||||
|
opacity: 50%;
|
||||||
|
font-size: 90%;
|
||||||
|
background: white;
|
||||||
|
cursor: col-resize;
|
||||||
|
border-radius: 30px 1cm;
|
||||||
|
}
|
||||||
|
p#yak {
|
||||||
|
flex: content;
|
||||||
|
height: 60px;
|
||||||
|
left: -4%;
|
||||||
|
padding: 6cm;
|
||||||
|
margin: auto;
|
||||||
|
border: 5px solid blue;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@ -21,6 +37,7 @@
|
||||||
<div id=bar style="color: green">Other text</div>
|
<div id=bar style="color: green">Other text</div>
|
||||||
<div id=invisible>You cannot see me</div>
|
<div id=invisible>You cannot see me</div>
|
||||||
<div id=visible>You CAN see me</div>
|
<div id=visible>You CAN see me</div>
|
||||||
|
<p id="yak">Lorem Yaksum dolor sit yakkety...</p>
|
||||||
<script>
|
<script>
|
||||||
// #foo
|
// #foo
|
||||||
var foo = document.getElementById("foo");
|
var foo = document.getElementById("foo");
|
||||||
|
@ -43,6 +60,12 @@ var visible = document.getElementById("visible");
|
||||||
var visibleStyle = getComputedStyle(visible);
|
var visibleStyle = getComputedStyle(visible);
|
||||||
console.log(visibleStyle.display)
|
console.log(visibleStyle.display)
|
||||||
console.log(visibleStyle.color)
|
console.log(visibleStyle.color)
|
||||||
|
|
||||||
|
var yak = document.getElementById("yak");
|
||||||
|
var yakStyle = getComputedStyle(yak);
|
||||||
|
for (style of ['font-size', 'border', 'padding', 'margin', 'flex', 'height', 'left', 'cursor', 'display', 'background', 'opacity', 'border-radius']) {
|
||||||
|
console.log(style, yakStyle[style])
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue