使用 CSS 属性 text-transform:uppercase copying as uppercase in chrome 转换的文本。这是 chrome 中的新功能还是错误?

Text transformed using the CSS property text-transform:uppercase copying as uppercase in chrome. Is this a new feature or a bug in chrome?

文本转换 属性 没有用于复制为大写,但是,我注意到 Chrome 版本 78.0.3904.108(官方构建)(64 位)在 Mac, 文本现在复制为大写。

转换后的文本:

.lowercase {text-transform: lowercase; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }



hr { margin: 2.5em 0; }
<p><strong>text-transform: lowercase;</strong></p>
<p class="lowercase">THIS WILL BE TRANSFORMED TO LOWERCASE.</p>
<hr>
<p><strong>text-transform: uppercase;</strong></p>
<p class="uppercase">this will be transformed to uppercase.</p>
<hr>
<p><strong>text-transform: capitalize; </strong></p>
<p class="capitalize">This will be transformed to capitalize all words, including both parts of this hyphenated word: double-parked.</p>
<p class="capitalize">"These words are in 'quotes'."</p>
<p class="capitalize">This text includes a date: February 4th, 2015.</p>
<p class="capitalize">This text includes an acronym: CSS.</p>

然后我尝试在 Mac 上的 Firefox 70.0.1(64 位)中复制相同的转换文本,它仍然有旧的行为。

这是新 Chrome 功能还是意外错误?

我们依靠此功能来控制我们网站上的某些行为,有没有办法强制执行旧行为?

这个问题其实很老了,filed in the Chromium project 早在 2010 年就出现了。

2018年the CSS working group decided:

The Working Group just discussed text-transform on copy/paste, and agreed to the following resolutions:

RESOLVED: text-transform doesn't apply to plain text copy paste

因此,可以将此行为视为错误,您可以投票支持更快的修复。尽管 Chromium 开发人员已经知道 CSS 工作组的决定。