Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text-decor/parsing/text-emphasis-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Decoration Test: getComputedStyle().textEmphasis</title>
<meta name="assert" content="text-emphasis computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#target {
color: blue;
}
</style>
</head>
<body>
<div id="target"></div>
<script>
'use strict';
const currentColor = "rgb(0, 0, 255)";
test_computed_value("text-emphasis", "none", `none ${currentColor}`);
test_computed_value("text-emphasis", "dot", `dot ${currentColor}`);
test_computed_value("text-emphasis", "open sesame", `open sesame ${currentColor}`);
test_computed_value("text-emphasis", "'*'", `"*" ${currentColor}`);
test_computed_value("text-emphasis", "currentColor", `none ${currentColor}`);
test_computed_value("text-emphasis", "black", `none rgb(0, 0, 0)`);
test_computed_value("text-emphasis", "dot red", `dot rgb(255, 0, 0)`);
</script>