1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:05:08 +00:00
serenity/Tests/LibWeb/Text/input/css/font-family-with-dash-prefix.html
Andreas Kling 5955a504e0 LibWeb: Allow font-family names to start with -
We achieve this by making properties that accept a custom-ident value
skip the "someone else's vendor prefix" check for values that start with
a `-` character.

This fixes an issue where e.g `font-family: Arial, -apple-system` would
be rejected by the parser completely. We now treat `-apple-system` like
an identifier in such cases.

Also add `valid-types` metadata for the `font-family` property so this
actually works. :^)
2023-07-06 14:30:06 +02:00

9 lines
264 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
const e = document.createElement("div");
e.style.fontFamily = 'sans-serif';
e.style.fontFamily = 'serif, -apple-system';
println(e.style.fontFamily);
});
</script>