mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 08:31:51 +00:00
Better support for CSS shorthands when setting the style attribute. This improves some tests in WPT /css/css-align/default-alignment/*shorthand. When setting the style attribute in JS via element.style = '..' or the setAttribute method, shorthand properties were not expanded to longhand properties.
15 lines
481 B
HTML
15 lines
481 B
HTML
<!doctype html>
|
|
<div id="target" style="background: yellow">Hello</div>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let target = document.getElementById("target");
|
|
let style = target.style;
|
|
println(`style.cssText = ${style.cssText}`);
|
|
println(`style.length = ${style.length}`);
|
|
println(`style[] =`);
|
|
for (let i = 0; i < style.length; ++i) {
|
|
println(`${i+1}. ${style[i]}`);
|
|
}
|
|
});
|
|
</script>
|