css-attr-typed-fallback.html 630 B

1234567891011121314151617181920212223242526
  1. <!doctype html>
  2. <link rel="match" href="reference/css-attr-typed-ref.html" />
  3. <style>
  4. div {
  5. width: 100px;
  6. height: 20px;
  7. border: 1px solid black;
  8. }
  9. .string::before {
  10. content: attr(foo string, "WHF!");
  11. }
  12. .length {
  13. width: attr(foo length, 200px);
  14. }
  15. .px {
  16. width: attr(foo px, 200px);
  17. }
  18. .color {
  19. background-color: attr(foo color, lime);
  20. }
  21. </style>
  22. <div class="string"></div>
  23. <div class="length" foo="90pizzas"></div>
  24. <div class="px" foo="twohundred"></div>
  25. <div class="color" foo="grunge"></div>
  26. <div class="color" foo="rgb(0,0,0)"></div>