mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 02:26:11 +00:00
![Timothy Flynn](/assets/img/avatar_default.png)
When a string-type attr() substitution produces no value and no fallback had been specified, the spec mandates we default to the empty string.
31 lines
744 B
HTML
31 lines
744 B
HTML
<!doctype html>
|
|
<link rel="match" href="reference/css-attr-typed-ref.html" />
|
|
<style>
|
|
div {
|
|
width: 100px;
|
|
height: 20px;
|
|
border: 1px solid black;
|
|
}
|
|
.string::before {
|
|
content: attr(foo string, "WHF!");
|
|
}
|
|
.string-no-fallback::before {
|
|
content: attr(foo string);
|
|
}
|
|
.length {
|
|
width: attr(foo length, 200px);
|
|
}
|
|
.px {
|
|
width: attr(foo px, 200px);
|
|
}
|
|
.color {
|
|
background-color: attr(foo color, lime);
|
|
}
|
|
</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>
|
|
<div class="color" foo="rgb(0,0,0)"></div>
|