mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 10:18:59 +00:00
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. :^)
This commit is contained in:
parent
dfdb31f5b0
commit
5955a504e0
Notes:
sideshowbarker
2024-07-17 04:03:27 +09:00
Author: https://github.com/awesomekling
Commit: 5955a504e0
Pull-request: https://github.com/SerenityOS/serenity/pull/19839
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 17 additions and 2 deletions
|
@ -0,0 +1,9 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue