| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <title>CSS Backgrounds and Borders Module Level 3: parsing background-color with valid values</title> |
| <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> |
| <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-color"> |
| <meta name="assert" content="background-color supports the full grammar '<color>'."> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/css/support/parsing-testcommon.js"></script> |
| </head> |
| <body> |
| <script> |
| test_valid_value("background-color", "currentcolor", "currentcolor"); |
| test_valid_value("background-color", "currentColor", "currentcolor"); |
| |
| test_valid_value("background-color", "red"); |
| test_valid_value("background-color", "#00FF00", "rgb(0, 255, 0)"); |
| test_valid_value("background-color", "rgb(0, 0, 255)"); |
| test_valid_value("background-color", "rgb(100%, 100%, 0%)", "rgb(255, 255, 0)"); |
| test_valid_value("background-color", "hsl(120, 100%, 50%)", ["rgb(0, 255, 0)", "hsl(120, 100%, 50%)"]); // Edge serializes as hsl |
| test_valid_value("background-color", "teal"); |
| |
| test_valid_value("background-color", "transparent"); |
| </script> |
| </body> |
| </html> |