Skip to content

Commit

Permalink
[css-text] plain-text copy & paste does not preserve text-transform
Browse files Browse the repository at this point in the history
This is a test for w3c/csswg-drafts#627
  • Loading branch information
frivoal committed Oct 9, 2018
1 parent 434ca47 commit bab4dc0
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS Text 3 test: effects of text-transform on plain text copy&paste</title>
<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel=help href="https://drafts.csswg.org/css-text-3/#text-transform-property">
<meta name=flags content="interact">
<meta name=assert content="text-transform must not affect the content of a plain text copy and paste operation.">
<!--
I wish this test could be written automatedly, but I don't think it can,
given that document.execCommand(‘copy’) only works when triggered by user interactions.
-->
<style>
div {
text-transform: uppercase;
border: solid 5px blue;
}
textarea { border: solid 5px orange; }
div, textarea { padding: 1em; }
</style>

<p>Copy the content of the blue box, then paste it in the orange box.
<p>The test passes if the result is in lowercase.

<div id=source>there is no need to shout</div>
<textarea></textarea>

0 comments on commit bab4dc0

Please sign in to comment.