ladybird/Tests/LibWeb/Text/input/css/attr-serialization.html
Sam Atkins 8f01297182 LibWeb: Remove now-invalid attr() type support
Previously the type argument in attr() could be the name of a CSS type
on its own. This has changed, and now only `raw-string`
(previously `string`) or the name of a dimension unit is allowed. Other
types and more complex grammar use the `type()` function, which we
don't yet support.

I've updated the syntax comment, but not the algorithm itself, which
will be reimplemented in a later commit.
2025-07-09 16:44:20 +01:00

24 lines
1,001 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
function serialize(input) {
document.body.style.content = input;
println(document.body.style.content);
}
serialize('attr(foo)');
// FIXME: This should produce `attr(foo)` but doesn't yet.
serialize('attr( foo )');
serialize('attr(foo, "fallback")');
// FIXME: This should produce `attr(foo, "fallback")` but doesn't yet.
serialize('attr( foo , "fallback" )');
serialize('attr(foo raw-string)');
// FIXME: This should produce `attr(foo raw-string)` but doesn't yet.
serialize('attr( foo raw-string )');
serialize('attr(foo raw-string, "fallback")');
// FIXME: This should produce `attr(foo raw-string, "fallback")` but doesn't yet.
serialize('attr( foo raw-string , "fallback" )');
serialize(' attr(foo) attr(bar) attr(baz) ');
});
</script>