Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference: transparent selected text stays invisible</title>
<link rel="author" title="Helmut Januschka" href="mailto:helmut@januschka.com">
<script src="support/selections.js"></script>
<style>
#test {
color: transparent;
font-size: 300%;
}
#test::selection {
color: transparent;
}
</style>
<p>Test passes if "Selected Text" is visible (not transparent) while selected.
<div id="test">Selected Text</div>
<script>selectNodeContents(document.getElementById("test"));</script>