mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +00:00
LibWeb: Default to an empty string when a string attr substitution fails
When a string-type attr() substitution produces no value and no fallback had been specified, the spec mandates we default to the empty string.
This commit is contained in:
parent
4ced84a548
commit
bf1c82724f
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/trflynn89
Commit: bf1c82724f
Pull-request: https://github.com/SerenityOS/serenity/pull/23985
Issue: https://github.com/SerenityOS/serenity/issues/23939
6 changed files with 34 additions and 10 deletions
|
@ -9,6 +9,9 @@
|
|||
.string::before {
|
||||
content: attr(foo string, "WHF!");
|
||||
}
|
||||
.string-no-fallback::before {
|
||||
content: attr(foo string);
|
||||
}
|
||||
.length {
|
||||
width: attr(foo length, 200px);
|
||||
}
|
||||
|
@ -20,6 +23,7 @@
|
|||
}
|
||||
</style>
|
||||
<div class="string"></div>
|
||||
<div class="string-no-fallback"></div>
|
||||
<div class="length" foo="90pizzas"></div>
|
||||
<div class="px" foo="twohundred"></div>
|
||||
<div class="color" foo="grunge"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue